2019-05-16 12:38 AM
I tried to to use SPI2 of STM32F103c8 but unable to intialize . while debugging i got to know that even after intializiation nothing is being written on SPI2 control Registers.
2019-05-16 06:18 AM
Hello,
ST is providing an SPI example within STM32CubeF1 firmware package, that will help you to correctly configure your peripheral:
STM32Cube_FW_F1_V1.7.0\Projects\STM32F103RB-Nucleo\Examples\SPI.
Hope this helps you.
Best Regards,
Imen
2019-05-16 12:41 PM
If by any chance you're directly programming the MCU registers without using STM Cube, HAL, and/or LL, make sure you are setting the SPI2EN bit (bit 14) in the RCC->APB1ENR to enable SPI2. Otherwise writes to the SPI registers will have no effect.
If you are using Cube/HAL/LL this should already be done automatically and likely you (or Cube) haven't used the correct initialization functions. Check RCC->APB1ENR bit 14 in your debugger to see if it's been set.
2019-05-16 10:37 PM
I have tried this with HAL an d SPL driver both and then i tried with hard code directly confuring register and clock configured ,GPIO configured and checked in RCC->APB1ENR bit 14 SPI2EN is set but no effect on SPI register.
2024-02-11 12:33 PM
2024-02-11 11:39 PM
@hamo ,
Start a new thread, describing your software, what is the expected and the observed behaviour.
JW
2024-02-12 12:06 AM