Gedare Bloom started a new discussion on bsps/arm/stm32f4/spi/spi.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294#note_152125

 > +
 > +  /* 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);

although not strictly necessary, you should probably call 
`rtems_binary_semaphore_destroy()` in the error handling paths here.

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


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to