3482.code.zip
I have the code files as shown in the compressed package. I am currently compiling them into (A: nRF7002 DK nRF5340 application MCU - Non Secure / B: nRF7002 DK nRF5340 application MCU). However, different results have been obtained. In A, the program runs normally, but in B, the spi driver seems to have an error ( <err> spi_nrfx_spim: Timeout waiting for transfer complete ).
This seems to be related to the memory optimization during the compilation process by the compiler, but I'm not sure.
In my other project (still using the nRF5340 as the main component), it even directly caused the USB to stop working and all the outputs' registers to be set to 0.
If I transfer it to the ST series chips (such as Nucleo-STM32G431, this chip does not have USB, but the configuration file does not comment out the code related to USB), similar problems will occur as well. All the registers are 0, but if the USB-related configurations are commented out, it will return to normal.
Could there be any problems with this code?
Please note that if you attempt to burn the code separately, you should first erase it completely before proceeding with the burning process.
