RTEMS | bsps/arm/stm32f4: Add SPI bus driver (!1294)

Moksh Panicker (@mokshpanicker) gitlab at rtems.org
Mon Jun 8 19:53:03 UTC 2026




Moksh Panicker commented on a discussion on bsps/arm/stm32f4/spi/spi.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294#note_152137

 > +
 > +  /* Enable the peripheral clock before touching registers */
 > +  stm32f4_rcc_set_clock(rcc, true);
 > +
 > +  bus->base.bits_per_word = 8;
 > +  bus->base.mode          = 0;
 > +  bus->base.speed_hz      = pclk / 256; /* conservative default */
 > +  bus->base.max_speed_hz  = pclk / 2;
 > +  bus->base.delay_usecs   = 0;
 > +  bus->base.cs            = 0;
 > +  bus->base.cs_change     = 0;
 > +
 > +  rv = stm32f4_spi_setup(&bus->base);
 > +  if (rv != 0) {
 > +    stm32f4_rcc_set_clock(rcc, false);
 > +    spi_bus_destroy_and_free(&bus->base);

Done, added rtems_binary_semaphore_destroy() to all three error paths in stm32f4_spi_init(). Also reverted the obj.yml formatting to the original style as requested.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294#note_152137
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260608/88142c91/attachment-0001.htm>


More information about the bugs mailing list