Difference between revisions of "P32 paper project"
From DIDEAS Wiki
m |
m |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
*{{T_lab_topnav}} | *{{T_lab_topnav}} | ||
*{{T_lab_pca}} | *{{T_lab_pca}} | ||
+ | |||
+ | =LED status lights on P32= | ||
+ | <pre> | ||
+ | #define LED_BACKGROUND_TGL 0x80 // orange | ||
+ | #define LED_MSG_VALID 0x40 // green2 | ||
+ | #define LED_UART_EVENT 0x20 // red | ||
+ | #define LED_UART_QUEUE_EVENT 0x10 // blue | ||
+ | #define LED_TIC_TIMER 0x08 | ||
+ | #define LED_MAIN_LOOP 0x04 | ||
+ | #define LED_MSG_ERR 0x02 | ||
+ | #define LED_CLUTCH 0x01 // white : used by the solinoid! | ||
+ | </pre> | ||
+ | |||
+ | |||
=Telemetry access (PSW1, PSW2)= | =Telemetry access (PSW1, PSW2)= | ||
− | |||
− | |||
*wifi_fast.py -i bmech4 -V ak_p32 -f xx -F | *wifi_fast.py -i bmech4 -V ak_p32 -f xx -F | ||
− | * | + | *details at [[Biomech_wireless]] |
− | |||
− | |||
+ | ===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: | ||
+ | #104 - get the demux state and SM state of the SC statemachine | ||
+ | #1101 - read the MC mode | ||
+ | #1106 - read the MC encoder | ||
+ | #1420 - get the of the MC statemachine | ||
+ | *example : do_command.py -i bmech4.media.mit.edu -s 104 | ||
Line 15: | Line 34: | ||
*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 | *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 | ||
+ | =firmware architecture= | ||
+ | The old SVN server is now longer active. Efforts are underway to add the old SVN dump to a new lab maintained server. | ||
+ | *The temporary location of the firmware is: | ||
+ | https://bmech.media.mit.edu:8443/svn/ric_powerfoot/trunk | ||
− | |||
− | |||
− | |||
− | |||
− | |||
==P32 user level== | ==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: | *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: | ||
Line 46: | Line 64: | ||
==todo== | ==todo== | ||
− | # | + | |
− | #make sure SC boots MC and then enters idle state | + | #are ADCs mapped as expected? |
+ | #add command timeouts in MC firmware; | ||
+ | #thread safe / mappable printf | ||
+ | #DMA to RX robot dataport | ||
+ | #DMA to TX SWIFI dataport | ||
+ | |||
+ | |||
+ | #DONE make sure SC boots MC and then enters idle state | ||
+ | #DONE mappable getchar | ||
+ | #DONE : DMA to read ADCs | ||
+ | |||
+ | =system integration= | ||
+ | ==knee1.pcb 4-15-2010== | ||
+ | * PSW1, PSW2 need TX/RX crossover cable. (Eg signals TX/RX needs to be switched) | ||
+ | * PSW1 (or 2) need supply voltage to pin (1??) | ||
+ | * PISP requires cross over for both PGC / PGD and TX/RX | ||
+ | * PMC1, PSC1 use normal straight calbles, however require 3.3V to power the isolated driver. | ||
+ | |||
+ | =connections= | ||
+ | [[Jst_1mm_connectors]] |
Latest revision as of 17:06, 8 June 2011
- BiomechDocs BL Knee PFresearchE
- Biomech Documentation links:
- AKCPU2z BLMD6c BLFT6c PSER1c Imu_2010 Emg_2009 Ric Upd_pcb
Contents
LED status lights on P32
#define LED_BACKGROUND_TGL 0x80 // orange #define LED_MSG_VALID 0x40 // green2 #define LED_UART_EVENT 0x20 // red #define LED_UART_QUEUE_EVENT 0x10 // blue #define LED_TIC_TIMER 0x08 #define LED_MAIN_LOOP 0x04 #define LED_MSG_ERR 0x02 #define LED_CLUTCH 0x01 // white : used by the solinoid!
Telemetry access (PSW1, PSW2)
- wifi_fast.py -i bmech4 -V ak_p32 -f xx -F
- details at Biomech_wireless
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:
- 104 - get the demux state and SM state of the SC statemachine
- 1101 - read the MC mode
- 1106 - read the MC encoder
- 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
firmware architecture
The old SVN server is now longer active. Efforts are underway to add the old SVN dump to a new lab maintained server.
- The temporary location of the firmware is:
https://bmech.media.mit.edu:8443/svn/ric_powerfoot/trunk
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:
- Receive and decode the 'dataport' message from the robot
- Populate the remote sensors objects from the DP message
- Calls the user statemachine (which can send a command to the robot)
- 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
- the P32 waits for the robot MC to signal "boot success";
- after which it takes control of the MC and command current mode
- then starts calling the user statemachine
MC
- waits for commands either from the SC or the P32
SC
- monitors sensors and commands MCs to commutate and retries if necessary
- on success, enters an idle state (and remains there)
todo
- are ADCs mapped as expected?
- add command timeouts in MC firmware;
- thread safe / mappable printf
- DMA to RX robot dataport
- DMA to TX SWIFI dataport
- DONE make sure SC boots MC and then enters idle state
- DONE mappable getchar
- DONE : DMA to read ADCs
system integration
knee1.pcb 4-15-2010
- PSW1, PSW2 need TX/RX crossover cable. (Eg signals TX/RX needs to be switched)
- PSW1 (or 2) need supply voltage to pin (1??)
- PISP requires cross over for both PGC / PGD and TX/RX
- PMC1, PSC1 use normal straight calbles, however require 3.3V to power the isolated driver.