The odd thing was that the problem lay with JUST the peek function or host "IN" packets. I played around with the stm32_endp_isr_user_out() routines "IN" packet handling section. Wasnt sure of the state of DTOG_TX so I figured Id force it to 0 instead 1.
Immediately the first peek command from the next run worked and failed there after. After playing around with DTOG_TX forced to 1, toggled I finally deleted it, essentially leaving it floating and that worked
Basically delete this line from stm32_endp_isr_user_out()
stm32_usb_set_epr_dtog(wdEndP,\
1,\
STM32_USB_EPR_DTOG_TX_OFFSET);
End Result - arm m-3 minicom:
--------RESET----------- 27uS
--------RESET----------- 28uS
80 06 00 01 00 00 40 00
--------RESET----------- 28uS
00 05 3E 00 00 00 00 00
usb device address = 3E
80 06 00 01 00 00 12 00
80 06 00 02 00 00 09 00
80 06 00 02 00 00 20 00
80 06 00 03 00 00 FF 00
80 06 02 03 09 04 FF 00
80 06 01 03 09 04 FF 00
80 06 03 03 09 04 FF 00
00 09 01 00 00 00 00 00
00 08 ED FE 04 5C 00 40
user req peek [40005C04]=7021
00 08 ED FE 04 5C 00 40
user req peek [40005C04]=3061
00 08 ED FE 04 5C 00 40
user req peek [40005C04]=7021
00 08 ED FE 04 5C 00 40
user req peek [40005C04]=3061
00 08 ED FE 40 60 00 40
user req peek [40006040]=00
01 0C ED FE 40 60 00 40
user req poke [40006040]=B0
00 08 ED FE 40 60 00 40
user req peek [40006040]=B0
On the host linux pc side:
sudo ./peekstm32.out 0x40005c04
[40005c04] = 7021
sudo ./peekstm32.out 0x40005c04
[40005c04] = 3061
sudo ./peekstm32.out 0x40005c04
[40005c04] = 7021
sudo ./peekstm32.out 0x40005c04
[40005c04] = 3061
sudo ./peekstm32.out 0x40006040
[40006040] = 0
sudo ./peekstm32.out 0x40006040 0xb0
sudo ./peekstm32.out 0x40006040
[40006040] = b0
DONE!!!
No comments:
Post a Comment