STM32L496: Unable to go in DFU when use HAL_SPI_Transmit_DMA
Hello guys,
I'm not new using DFU but I have this strange problem.
When I try to jump in DFU from my code, I get an "Unknown usb device" from my PC.
I have also 2 push button in my board. Reset and DFU pin (keep PH3 high ).
If I keep pressed DFU button and then pressing Reset it fall in the same state (Unknown device).
If I keep pressed DFU button and plug the usb (I get the power from usb) it works.
Investigating I discovered that commenting this line
HAL_SPI_Transmit_DMA(&hspi1,(uint8_t *)bProgADC,sizeof(bProgADC));
DFU works in every case.
What is very strange is that resetting MCU while keep pressed DFU button is not enough, I must cut the power and plug the usb cable while pressing DFU button to go in DFU.
While commenting that SPI line everything is fine
How HAL_SPI_Transmit_DMA can cause this?
How can I fix it?
Thanks in advance
--
Mario
