Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Wait after Reset on APB peripheral reset register?

Hello

Does anyone of you know, if i have to wait some CPU cycles after reseting an Peripherial in the APB peripheral reset register 1 (RCC_APB1RSTR) or register 2 (RCC_APB2RSTR)?

The SPL does it without a wait, but they call a function to do the reset and release the reset, I think this will automatically force some CPU cycles between setting the reset bit and release the reset bit.

/* Enable I2C1 reset state */
RCC_APB1PeriphResetCmd(RCC_APB1Periph_I2C1, ENABLE);
/* Release I2C1 from reset state */
RCC_APB1PeriphResetCmd(RCC_APB1Periph_I2C1, DISABLE);

I want to do it like this:

/* Enable I2C1 reset state */
RCC->APB1RSTR |= RCC_APB1Periph_I2C1;
/* Release I2C1 from reset state */
RCC->APB1RSTR &= ~RCC_APB1Periph_I2C1;

Is this a problem with the timing? Do I have to wait? And how many cycles?
Do I have to wait some cycles between set the reset bit and release the reset bit?
And do I have to wait also some cycles bevore I acces the registers afterwords to configure the I2C?

I thank you verry much for your expertise.

Best regards
Matthias

 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs