Commit Graph

13 Commits

Author SHA1 Message Date
Stefan Kerkmann 1b6540a61c Update systick reload value
The systick timer is driven by the AHB bus divided by 4, set the correct
reload value to generate a timer irq every ms.
2021-08-09 21:37:06 +02:00
Stefan Kerkmann 27f147f421 Minor style changes 2021-08-07 14:08:18 +02:00
Stefan Kerkmann 0399996ee5 Code style changes 2021-08-07 11:33:36 +02:00
Stefan Kerkmann 66d566f8c0 Use functions provided by the nuclei-sdk hal 2021-08-07 11:33:36 +02:00
Stefan Kerkmann 60d03110f7 Correctly initialize and handle the system tick
Forgot to reload the systick timer in the irq handler
2021-08-07 11:33:36 +02:00
Stefan Kerkmann 1d2a57a9e1 Remove unsuitable clock configurations from init code
Only 48MHz, 72MHz, 96MHz and 120 MHz system clocks derived from an
external crystal are suitable for the usb peripheral, as the internal
oscillator is not stable enough. Also the usb-prescaler only supports
division by 1 (48MHZ), 1.5(72MHz), 2(96MHz) and 2.5(120Mhz).
120Mhz is also out of spec and not added here.
2021-08-07 11:33:36 +02:00
Stefan Kerkmann 733a362436 Use nuclei-sdk functions for init code
Instead of using the HAL functions we can just use the defines from the
board support for the longan nano that comes with the nuclei-sdk. Also
we move some includes and defines to the header file.
2021-08-07 11:32:06 +02:00
Stefan Kerkmann 6e287a7c5e Cleanup include paths and use linker files from nuclei-sdk 2021-08-07 09:51:56 +02:00
Stefan Kerkmann b473923f42 Remove redundant linker files
We use the linker files provided by nuclei-sdk instead
2021-08-07 09:51:16 +02:00
Stefan Kerkmann 790d90bf26 Set FreeRTOS to RISC-V (doesn't compile) 2021-08-03 20:01:10 +02:00
Stefan Kerkmann 23e3b1680b Use JTAG for jlink flashing 2021-08-03 20:01:10 +02:00
Stefan Kerkmann 3db2089aa9 Minor clean ups 2021-08-03 20:00:39 +02:00
Stefan Kerkmann 19b971cb24 Add board support for gd32vf103 longan nano 2021-08-03 20:00:39 +02:00