P32 paper project

From DIDEAS Wiki
Revision as of 11:59, 10 June 2010 by Ceb (talk | contribs) (todo)
Jump to: navigation, search

Edit

Telemetry access (PSW1, PSW2)

with SWIFI

  • wifi_fast.py -i bmech4 -V ak_p32 -f xx -F
  • bmech4 is access point, with lan ip 10.2.0.251, uses DMZ to route traffic.
  • A 4 wire cable with pins 2,3 swapped is connected from PSW1 to the SWIFI port labeled M
  • This interface is NOT isolated and can power the SWIFI

special commands

"do_command.py" can be used to query the SC and MC for specific information.

  • There is a long list of commands - some are even documented!
  • A short list:
  1. 104 - get the demux state and SM state of the SC statemachine
  2. 1101 - read the MC mode
  3. 1106 - read the MC encoder
  4. 1420 - get the of the MC statemachine
  • example : do_command.py -i bmech4.media.mit.edu -s 104


with PSER2h

  • PSW1 and PSW2 are not isolated, but also do NOT provide 3.3V. The PSER2h is isolated and needs 3.3V to power the isolator. Thus it may not be possible to connect to the PSER2h without modifications


SWIFI LAN IPs

  • S5 = 10.2.0.218
  • S3 = 10.2.0.216

firmware architecture

P32 user level

  • The state controller operates in a mid priority level thread. This means that it will interrupt lower priority threads. Before and after calling the statemachine other actions are performed:
  1. Receive and decode the 'dataport' message from the robot
  2. Populate the remote sensors objects from the DP message
  3. Calls the user statemachine (which can send a command to the robot)
  4. Sends the dataport message.
  • This mid priority level thead
  • The main loop is used as a background thread. At present its doing printf and actually calls ms_delay(100)!

system level

  • Upon power on:

P32

  1. the P32 waits for the robot MC to signal "boot success";
  2. after which it takes control of the MC and command current mode
  3. then starts calling the user statemachine

MC

  1. waits for commands either from the SC or the P32

SC

  1. monitors sensors and commands MCs to commutate and retries if necessary
  2. on success, enters an idle state (and remains there)

todo

  1. complete joint encoder firmware
  2. complete code to talk to join encoder.
  3. install joint encoder
  4. are ADCs mapped as expected?
  5. add command timeouts in MC firmware;
  6. thread safe / mappable printf
  7. DMA to RX robot dataport
  8. DMA to TX SWIFI dataport
  9. why is S3 SC serial port not working
  10. bring S5 in; will need MC build w/out MILE - need to verify works.


  1. DONE make sure SC boots MC and then enters idle state
  2. DONE mappable getchar
  3. DONE : DMA to read ADCs