158 Commits

Author SHA1 Message Date
Pat Rogers
17d7b4b9f0 Merge pull request #437 from liampwll/master
Wait for STM32 timer output to be enabled before returning from enable procedure.
2025-08-29 16:49:17 -05:00
Andrii Fil
8a62be90b9 Data_Register_Address remove prefix 2025-05-23 10:56:31 +03:00
Andrii Fil
be01470f7c Data_Register_Address for Timers 2025-05-23 10:56:31 +03:00
Andrii Fil
08a088016b Append support DMA for PWM. Create example demo_pwm_dma_continuous 2025-05-23 10:56:31 +03:00
Fabien Chouteau
cc5e769b90 Misc warning fixes 2025-05-15 10:49:56 +02:00
Maxim Reznik
6b1413da5d Avoid losing input bytes in the UART on STM32F4xx.
The compiler expands an assignment to part of the DR register
to a read-modify-write sequence. However, reading DR has
the side-effect of clearing the SR.RXNE bit, so sending
a byte could result in the loss of input bytes.
2025-01-27 20:11:27 +02:00
Maxim Reznik
983f3b1a33 Add System Reset Request routine. 2025-01-26 18:29:36 +02:00
Fabien Chouteau
2f7e69cc8f arch/ARM/cortex_m: add Systick package 2025-01-26 18:29:36 +02:00
Fabien Chouteau
b3d8558fdb arch/ARM/cotrex_m: preelaborate some units 2025-01-26 18:29:36 +02:00
Maxim Reznik
dba3ecea04 Add enable, reset, configuration routines for Eth periph
To make ethernet driver independent on STM32_SVD.RCC and
STM32_SVD.SYSCFG packages.
2025-01-26 18:28:50 +02:00
Liam Powell
63dc19d1e9 Wait for STM32 timer output to be enabled before returning from enable procedure.
RM0386 Rev 6 22.3.12 notes that there may be a delay before the BDTR.MOE
bit reads as 1 after writing to it. The RM says that only a single
instruction is needed, but testing has shown that this is incorrect.

With the previous code, calling Enable_Main_Output and then immediately
calling a procedure to set a different part of the register could result
in the MOE bit being inadvertently set low.
2024-11-17 20:15:06 +08:00
Maxim Reznik
22ae2aea53 Add more readme files. 2023-12-06 16:38:32 +02:00
Maxim Reznik
945dde1dbc Add FSMC for stm32f40X 2023-12-06 16:38:32 +02:00
Maxim Reznik
51e21e7160 Add SD card to stm32f4xx_m board 2023-12-06 16:38:32 +02:00
Fabien Chouteau
13b379aad3 Switch to GNAT FSF 12 support (#418)
* Switch to GNAT FSF 12 support

* GNAT FSF 12 in GitHub CI

* Update README.md

* Remove run-time dependency build script that is not compatible with GNAT FSF

This script is also not needed as all the BSPs are included in GNAT FSF.
2023-01-02 11:34:55 +01:00
Simon Wright
bbdc182bdf Correct the transmit protocol for Nordic TWI. (#417)
* Correct the transmit protocol for Nordic TWI.
The register address and the data must be sent in one operation, as
specified in the nRF51 Series Reference Manual version 3.0.

  * arch/ARM/Nordic/drivers/nrf_common/nrf-twi.adb:
    (Master_Transmit): Clear any previous Suspend/Stop settings before
      the transfer.
      Only do a Stop_Sequence if requested.
    (Mem_Write): Call Master_Transmit to send the data as well as the
      register address in one transaction. This requires moving the
      Do_Stop_Sequence setting to before this single transaction.

* Revert Nordic TWI Mem_Write to original.

Avoids creating a potentially large data buffer on the stack.

  * arch/ARM/Nordic/drivers/nrf_common/nrf-twi.adb (Mem_Write): reverted to
      sending the register address without a stop sequence, followed by the
      data, followed by a stop sequence.
2022-12-05 16:19:36 +01:00
Marc Poulhiès
9cfecd5085 Small typo fix
Trivial typo fix.
2022-02-22 10:16:47 +01:00
Pat Rogers
2cda6a58ad clean up the inline assembly language for procedure Lock_The_Pin (#392)
* clean up the inline assembly language for procedure Lock_The_Pin

* clean up the inline assembly language for procedure Lock_The_Pin
2021-11-04 11:21:58 +01:00
Jeremy Grosser
3a38be021b Add Cortex_M.Hints, which provides access to hint instructions like Wait_For_Interrupt (WFI) (#387) 2021-06-29 10:51:58 +02:00
Simon Wright
f100ce784e Use symbolic interrupt priority for SDMMC. (#382)
* Use symbolic interrupt priority for SDMMC.

  * arch/ARM/STM32/drivers/sd/stm32-sdmmc_interrupt.ads
    (SDMMC_Interrupt_Handler): Supply the required interrupt priority via
      a discriminant.

* Added omitted 'with System'.

  * arch/ARM/STM32/drivers/sd/stm32-sdmmc_interrupt.ads: as summary.

* Matching change for boards where SDCard is used.

 * boards/stm32_common/sdcard/sdcard.adb (SD_Interrupt_Handler):
     include Priority discriminant.
2021-03-11 11:53:35 +01:00
Fabien Chouteau
a407ca7ddb Remove unused code (#378) 2020-12-14 17:08:28 +01:00
Fabien Chouteau
acf34d580c Cortex-M systick: Fix TICKINT values (#377)
The fix was fixed in the SVD files [1] but not in ADL.

[1] c2fb35bfc9
2020-12-01 10:19:51 +01:00
Fabien Chouteau
aa288ccb5f cortex_m/src/nvic_cm0/cortex_m-nvic.ad[bs]: Fix interrupt priority (#373)
Based on #330.
2020-10-07 17:25:53 +02:00
Lambourg Jérôme
2aabce0d9b Various fixes (#184)
* stm32.Setup: take care of already initialized I2C ports.

* HAL: fix the alignment of audio buffers.
2020-10-07 11:40:22 +02:00
Simon Wright
a955b10f90 Add interrupt support for Nordic GPIO. (#371)
* Add GPIO interrupt support for Nordic GPIO.

  * arch/ARM/Nordic/drivers/nrf_common/nrf-gpio-tasks_and_events.ad[sb]:
      Added subprograms to enable, test for presence, acknowledge and
      disable both channel and port interrupts.

* Correct style warnings for Nordic GPIO interrupts.

* Match Nordic GPIO changes to AdaCore style.

  * arch/ARM/Nordic/drivers/nrf_common/nrf-gpio-tasks_and_events.ads
    (Channel_Event_Is_Set): renamed to Channel_Event_Set.
    (Port_Event_Is_Set): similarly.
  * arch/ARM/Nordic/drivers/nrf_common/nrf-gpio-tasks_and_events.adb:
    likewise. Keyword 'is' always on new line.
2020-09-24 18:32:33 +02:00