Commit Graph

179 Commits

Author SHA1 Message Date
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
Roderick Chapman fce621480b
Add first draft of FE310.Performance_Monitor package. (#370)
* Add first draft of FE310.Performance_Monitor package.

* Correct comments and remove white-space.
2020-10-12 10:33:56 +02: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
Fabien Chouteau c9290bc39d
Add RISC-V performance CSR support (#363)
* Add RISC-V performance CSR support

* RISC-V Read_CSR_64: fix rv32 version

* RISC-V improve CSR support

Add sub-program to swap, set bits, clear bits, etc.
Instantiate sub-programs for all machine CSRs.
2020-09-15 18:08:30 +02:00
Simon Wright a5014924e5 Reduce optimization opportunities in Semihosting.
* arch/ARM/cortex_m/src/semihosting.adb (Write_0): Data is of new
      type Byte_Array, which is a new UInt8_Array with volatile
      components (FSF GCC was miscompiling at -O3).
2020-06-17 16:41:11 +02:00
Michael du Breuil 72bbae6116 STM32: Allow specifying the GPIO speed on PWM pins 2020-03-13 11:23:01 +01:00
Shawn Nock 0bc6ee3a06 Aligns copyright statements in headers to AdaCore requirements 2020-03-10 17:22:21 +01:00
Fabien Chouteau 0c5ebd62d3 Merge nRF51 and nRF52 SPI master implementations 2020-03-10 17:22:21 +01:00
Fabien Chouteau b592973620 nRF.Device: Add missing devices 2020-03-10 17:22:21 +01:00
Fabien Chouteau c8b8e81301 nRF: split the ppi driver 2020-03-10 17:22:21 +01:00
Fabien Chouteau 3e828649f8 Bump copyright notice 2020-03-10 17:22:21 +01:00
Shawn Nock 93ae03813f Removes unused separate subroutine 2020-03-10 17:22:21 +01:00
Shawn Nock 285fdf3209 Use updated nrf52 svd 2020-03-10 17:22:21 +01:00
Fabien Chouteau c3d62fe587 nRF51/52: fix style 2020-03-10 17:22:21 +01:00
Fabien Chouteau fb9dcfd06e Fix nRF52 SVD packages
Either the SVD file of svd2ada should also be fixed,
but this will do for the time being.
2020-03-10 17:22:21 +01:00
Fabien Chouteau b8ffaa6804 Cortex_M.NVIC: redefine interrupt and priority instead of subtype 2020-03-10 17:22:21 +01:00
Fabien Chouteau 6ac94c492c Remove nrf_svd-swi.ads: the package is not usable 2020-03-10 17:22:21 +01:00
Shawn Nock d26e14e5c2 nRF52832 and nRF52 DK Support 2020-03-10 17:22:21 +01:00
Francesc Rocher 4ceb99fb3d stm32: Add support to stop ADC conversions
This is useful if you want to change the channel of a regular conversion
in progress in a given ADC converter.

For example:

   RC_Conversion : Regular_Channel_Conversions :=
     (1 => (Channel => 3, Sample_Time => T));

   ...

   -- start regular conversions of channel 3
   Configure_Regular_Conversions (ADC_Converter, Continous => True,
      Trigger => Software_Ttriggered, Enable_EOC => False,
      Conversions => RC_Conversion);
   Start_Conversion (ADC_Converter);

   ...

   -- change to ADC channel 10:
   RC_Conversion (1).Channel := 10;
   Stop_Conversion (ADC_Converter);
   Configure_Regular_Conversions (ADC_Converter, Continous => True,
      Trigger => Software_Ttriggered, Enable_EOC => False,
      Conversions => RC_Conversion);
   Start_Conversion (ADC_Converter);
2020-02-18 11:15:05 +01:00
Shawn Nock bd611e004c Rename cm0 NVIC api functions to match the cm4_cm7 impl
This allows for a unified driver in families that have members on both
sides. Useful for nRF family, but also should lower-end STM32 parts become
supported in the future.
2020-02-13 12:49:21 +01:00
Fabien Chouteau f123af4fb8 Cortex_M.NVIC: Fix indentation 2020-01-13 16:36:39 +01:00
Fabien Chouteau f6ddfbb61f Cortex_M.NVIC: Fix Enable_Interrupt
The arguments of the left shits are reversed.
2020-01-13 16:36:39 +01:00
Alessandro Felicetti 391866ad37 Update nrf51-temperature.adb 2019-11-29 12:51:46 +01:00
Alessandro Felicetti 88991bc91d Update nrf51-temperature.ads 2019-11-29 12:51:18 +01:00
Fabien Chouteau 128742c669 nRF51: Add UART driver 2019-10-28 11:02:44 +01:00
Fabien Chouteau a61be055b9 RISC-V/SiFive: Add uart0 driver 2019-09-06 12:35:02 +02:00
Fabien Chouteau 8677f892a9 Add SiFive Unleased definition including a new device definition system
In the future, this device definition system could be combined with a
device tree parser.
2019-09-06 12:35:02 +02:00
Fabien Chouteau 7f756adc0e Add reusable SiFive drivers
This drivers will work on multiple instances of SiFive SOCs.
2019-09-06 12:35:02 +02:00
Fabien Chouteau 456c3231ac Use startup-gen on MicroBit board support 2019-08-22 19:53:17 +02:00
Fabien Chouteau d5715ba23a cortex_m-cache.adb: workaround GNAT Community bug 2019-06-21 18:44:44 +02:00
Fabien Chouteau ec09aafaa7
arch/svd.mk: fix typo
Part of #288
2019-01-23 17:55:54 +01:00
Fabien Chouteau b68e50fa8d nRF51: add SPI master driver 2018-10-26 19:32:51 +02:00
Simon Wright 894c600e00 Don't use DMA Half Transfer Complete
* arch/ARM/STM32/drivers/dma_interrupts/stm32-dma-interrupts.adb
    (Start_Transfer): don't enable Half_Transfer_Complete_Interrupt.
    (Interrupt_Handler): don't check/clear Half_Transfer_Complete_Indicated.
2018-09-18 14:45:12 +01:00
Fabien Chouteau 195be507b2 nRF51.GPIO.Tasks_And_Events: Add functions to access out tasks and in events 2018-07-13 19:44:34 +02:00
Fabien Chouteau 1494491598 nRF51.TWI: Fix Master_Receive 2018-07-13 19:44:34 +02:00
Fabien Chouteau ddab92871d
Merge pull request #265 from AdaCore/gpio_capabilities
[RFC] HAL.GPIO: Switch to a capability system
2018-07-13 18:35:46 +02:00
Fabien Chouteau cbdffd1b9c FE310: Remove useless with 2018-07-11 19:56:51 +02:00
Fabien Chouteau 4d32971732 HAL.GPIO: Switch to a capability system
Instead of returning False when a configuration is not supported, users
can call a function beforehand to know if it is supported. The
capability is also now a precondition of the setup procedures.
2018-07-11 18:46:16 +02:00