USB CDC on STM32F746 with ChibiOS 16.1
Posted: Tue Jul 26, 2016 6:48 pm
Hi!
I have been trying to get USB FS up and running on my board with an STM32F746IGK6 under ChibiOS/RT 16.1 (latest commits).
The problem I am having is that the USB seems to start correctly, but no USB CDC port is detected. (I run Linux)
* I have tested with a previous F4 board that detects the USB correctly.
* I have checked so the D+/D- are correctly connected (same as the DISCOVERY board).
* I have checked so the clock is correct by timing LED blinks on an oscilloscope.
So what I did was, I copied the testhal for USB_CDC, and the board starts and goes past all the USB startup without problems.
I also checked so the board files are matching.
And if I check the SDU2 it seems that the SDU is ready.
And the USB says that its state is ready:
But as described there is no USB connection detected and dmesg doesn't report any new USB connected.
Any recommendation on how to debug this as ChibiOS reports that everything is OK, but nothing happens on the PC side?
Thanks!
//Emil
I have been trying to get USB FS up and running on my board with an STM32F746IGK6 under ChibiOS/RT 16.1 (latest commits).
The problem I am having is that the USB seems to start correctly, but no USB CDC port is detected. (I run Linux)
* I have tested with a previous F4 board that detects the USB correctly.
* I have checked so the D+/D- are correctly connected (same as the DISCOVERY board).
* I have checked so the clock is correct by timing LED blinks on an oscilloscope.
So what I did was, I copied the testhal for USB_CDC, and the board starts and goes past all the USB startup without problems.
I also checked so the board files are matching.
And if I check the SDU2 it seems that the SDU is ready.
Code: Select all
SDU2 = {
vmt = 0x80086d8 <vmt>,
event = {
es_next = 0x200013f0 <SDU2+4>
},
state = SDU_READY,
ibqueue = {
waiting = {
p_next = 0x200013f8 <SDU2+12>,
p_prev = 0x200013f8 <SDU2+12>
},
bcounter = 0,
bwrptr = 0x20001460 <SDU2+116> "",
brdptr = 0x20001460 <SDU2+116> "",
btop = 0x20001668 <SDU2+636> "",
bsize = 260,
bn = 2,
buffers = 0x20001460 <SDU2+116> "",
ptr = 0x0,
top = 0x0,
notify = 0x203f11 <ibnotify>,
link = 0x200013ec <SDU2>
},
obqueue = {
waiting = {
p_next = 0x2000142c <SDU2+64>,
p_prev = 0x2000142c <SDU2+64>
},
bcounter = 2,
bwrptr = 0x20001668 <SDU2+636> "",
brdptr = 0x20001668 <SDU2+636> "",
btop = 0x20001870 <SDU2+1156> "\270\213",
bsize = 260,
bn = 2,
buffers = 0x20001668 <SDU2+636> "",
ptr = 0x0,
top = 0x0,
notify = 0x203f31 <obnotify>,
link = 0x200013ec <SDU2>
},
ib = '\000' <repeats 519 times>,
ob = '\000' <repeats 519 times>,
config = 0x8008bb8 <serusbcfg>
}And the USB says that its state is ready:
Code: Select all
USBD2 = {
state = USB_READY,
config = 0x8008ba8 <usbcfg>,
transmitting = 0,
receiving = 0,
epc = {0x800886c <ep0config>, 0x0, 0x0, 0x0, 0x0, 0x0},
in_params = {0x200013ec <SDU2>, 0x200013ec <SDU2>, 0x0, 0x0, 0x0},
out_params = {0x200013ec <SDU2>, 0x0, 0x0, 0x0, 0x0},
ep0state = USB_EP0_WAITING_SETUP,
ep0next = 0x0,
ep0n = 0,
ep0endcb = 0x0,
setup = "\000\000\000\000\000\000\000",
status = 0,
address = 0 '\000',
configuration = 0 '\000',
saved_state = USB_UNINIT,
otg = 0x40040000,
otgparams = 0x8008890 <hsparams>,
pmnext = 272,
txpending = 0,
wait = 0x20000f98 <USBD2+136>,
tr = 0x20000f98 <USBD2+136>,
wa_pump = {2305851805843590368, 2305861408853590018, 2305857165962774528, 2305860567174251388,
2305860107461787651, 2305860344238575552, 18446744069951459268, 0, 18446744069414584322,
4058744095665, 4294968241, 945, 6148914691236517205 <repeats 32 times>, 2305861839781975381,
6148914690341736208, 6148914691236517205, 6148914691236517205, 9028370580198741,
240191980126426453, 2305860155260014880, 9036529588531889, 2305860104615187797,
2305860156154795349, 9109784548605984, 2305860103720406936, 9133630743908248, 2305859570701634556,
9133304326393616, 4612811919765886293, 9040429953584912, 9010751729569688}
}But as described there is no USB connection detected and dmesg doesn't report any new USB connected.
Any recommendation on how to debug this as ChibiOS reports that everything is OK, but nothing happens on the PC side?
Thanks!
//Emil