2013-05-06 07:42 AM
2013-05-06 08:24 AM
Might want to check how you've got the JTAG remapped.
2013-05-06 08:27 AM
Hi clive1,
Thanks for your response. Actually I have not remapped the JTAG. I am using a SMT32VLDiscovery board for debugging, so the SWD link. Do I need to reamp the JTAG in any case? Thanks again, Juan2013-05-06 09:45 AM
The fact the VLDiscovery uses SWD has very little to do with the configuration of the chip itself.
I'd disable the non-SWD portion, per RM0008 ''Flexible SWJ-DP pin assignment'' GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE); This may, or may not, be your issue here.2013-05-07 08:37 AM
Hello, and thanks again.
I know the debugger I am using does not affect the way the chp is configured, but I thought that remapping the SPI would directly assign it ''over'' the other possible functions, like the JTAG, but this does not occur. So, I have remapped the JTAG, and checking with the scope I can see the master transmits properly the information. I have also made the transmissions easier, with just one word of 16bits, so the slave only performs the receiving part without DMA. I noticed on the forums there were some issues with the hardware NSS, so I changed it to software management: When the slave is selected (NSS is used as input GPIO), an interrupt is triggered and the software NSS is enabled. This part works good. The problem is that, even though the data and the clock come properly in the right pins, the slave does not get the data, so the RXNE flag is never set. I think it is possible that I am still missing something in the initiazlization and configuration of the SPI. Thanks again, and best regards, Juan2013-05-10 12:10 AM
Hello,
I found my problem. I was setting the GPIO configuration to the pins on the SPI, and remapping the SPI later. Apparently, it has to be done in the opposite order, i.e. remapping the peripheral first and setting the GPIO configuration afterwards. I have not found ST documentation/information explicitly mentioning this, so I think it can be useful for more people. Have a nice day!!2013-05-24 03:51 AM
Hey Juan,
Could you please share the modifications you made to the program. I am working on a STM32F4 discovery and i cannot make the slave to respond to the chip select. It responds every time the clock is active. Thank you, Horatiu