Commit Graph

172 Commits

Author SHA1 Message Date
plewka c334731dfe
Support for STM32F303xB based on STM32F303xC
The xB variant is different in Flash size only
2022-08-19 15:13:47 +02:00
Fabien Poussin d03aa9cc2f
Merge pull request #324 from WestberryTech/chibios-21.11.x-wb
Add some processing to the WB32 MCU series.
2022-07-27 10:46:15 +02:00
Joy 7aa5e64893 Added the implementation of embedded flash for WB32 MCU. 2022-07-07 14:43:18 +08:00
fauxpark 3d85866587 No need for system_MK64F12.h 2022-05-15 13:38:56 +10:00
fauxpark 09d1e9756f [WIP] Further K64F modifications, attempting to get USB working 2022-05-15 13:38:56 +10:00
Fabien Poussin e775cbbc88
Merge pull request #317 from SonixQMK/sn32_master_2.11
Sonix SN32 series support
2022-04-18 12:52:20 +02:00
Joy 3691f9affd Updated for better compatibility. 2022-04-14 11:19:43 +08:00
wb-joy 9905169cfe Added RT-WB32FQ95-GENERIC Example. 2022-03-22 17:14:05 +08:00
wb-joy e16ee1dab8 Added New MCU Serial for WB. 2022-03-22 13:15:39 +08:00
dexter93 99bd79f7c9 Centralize clocks handling for sn32f2xx (#38)
* sn32: 2xx: centralize peripheral clock functions

* sn32: export HCLK for all boards

* sn32: support tickless mode for systick

* sn32: CT: cleanup inclusions

* Revert "sn32: export HCLK for all boards"

This reverts commit 1cae8892e3ce908ef89774a7e83bb921ecd810fc.

* sn32: export HCLK in hal level

* ST: inherit the SN32_HCLK

* 2xx lld: include ct header

* ST: fix systime type

* ST: interrupt should be disabled on init

* st: cleanup

* debug it

* Revert "debug it"

This reverts commit 1dd78e81019aa1233f3402ed251428085470ab79.

* sn32f2xx: make sure clocks match and proper timer init

* add more checks

* always read 32 bits from the counter

* read the first 16 bits directly

* systime_t is 16bits, but MR0 lives in a 32bit register

* testing: use ILRC

* testing: hack

* Revert "testing: hack"

This reverts commit 3821173dd9a6180e3f91a3e81e73e9f92385e273.

* Revert "testing: use ILRC"
we can't do this because hardware limits
This reverts commit 19d3ffefbce8cdd5cd34859cd8befccda6353e58.

* fix assert

* test: hardcode it

* Revert "test: hardcode it"

This reverts commit a75777c44d12844eb0be44c650a1de1602cadaed.
2022-02-12 13:54:53 +02:00
Dimitris Mantzouranis 05ac8777a8 sn32: startup makefile fixes 2022-02-12 13:54:53 +02:00
IsaacDynamo 0fb99f8a4b Align ISR vector table to 512bytes 2022-02-12 13:51:12 +02:00
Dimitris Mantzouranis c34385de6b sn32: allow mcuconf to override system 2022-02-12 13:51:12 +02:00
Dimitris Mantzouranis f4f08b1b9b SN32 port updates
* add preliminary support for the whole SN32F2XX series
* unify CMSIS support, no more ugly hacks
* rename the unified hal to SN32F2XX
* common header amongst the hal, points to device
* add board files for the series
* 240 gets to keep it's own hal for now
2022-02-12 13:51:12 +02:00
Dimitris Mantzouranis 42b1ebd07f 240b: make sure we are full speed 2022-02-12 13:51:12 +02:00
IsaacDynamo df8d9a59b1 Add SN32F260_defines.h (#37) 2022-02-12 13:51:12 +02:00
IsaacDynamo 36a295e0d1 Replaced symlink with regular file. Documented the workaround (#27) 2022-02-12 13:51:12 +02:00
IsaacDynamo e72cf89dfa Fixed bug in sys clock init, also reported by glory (#22)
* Fixed bug in sys clock init, also reported by glory

* Removed modification of SN_FLASH->LPCTRL from SystemCoreClockUpdate(). SystemCoreClockUpdate() should only update the SystemCoreClock variable.
2022-02-12 13:51:12 +02:00
Dimitris Mantzouranis 77e28ce0f0 [sn32] 240b: decouple Core clock and Flash clock update
introduce a controller for Slow mode
2022-02-12 13:51:12 +02:00
Dimitris Mantzouranis c839ae7580 sn32: 260: inherit mcuconf.h and build the system 2022-02-12 13:51:12 +02:00
Dimitris Mantzouranis 283eb6f658 sn32: 260: add missing system_SN32F260.c 2022-02-12 13:51:12 +02:00
janjan 34f2c22327 Fixes for 268
This is inspired/copy-pasted from:

be7396a79f
2022-02-12 13:51:11 +02:00
janjan ac2695f8a2 Update SN32F260.h to latest version
This is taken from the latest pack file called:

"SONiX.SN32F2_DFP.1.2.11.pack"

This pack file is found in an archive named:

"SN32F260_Startkit_Package_V1.6R.zip"

download from here:

http://www.sonix.com.tw/article-en-998-24753 or
http://www.sonix.com.tw/files/1/9BB279642CFC9359E050007F01007A12

(extract that zip file and look in the "Pack" folder)

if you rename "SONiX.SN32F2_DFP.1.2.11.pack" to "SONiX.SN32F2_DFP.1.2.11.zip" you can extract it with a normal zip program

You find the file "SN32F260.h" in the folder "Device/Include"
2022-02-12 13:51:11 +02:00
HorrorTroll 8f693258a3 fix some speed issue for 240 chip 2022-02-12 13:51:11 +02:00
HorrorTroll a5c63c35fc Split 240B and 240, and clean up new USB code 2022-02-12 13:51:11 +02:00
Dimitris Mantzouranis 3f6d9c2118 sn32f240: inherit clocks from mcuconf.h 2022-02-12 13:51:11 +02:00
Stephen Peery a3973aa5a3 Sonix SN32 series support (SN32F248, SN32F260)
Squashes commits by:

smp4488 <smp4488@aol.com>
Ilya Zhuravlev <whatever@xyz.is>
Adam Honse <calcprogrammer1@gmail.com>
2022-02-12 13:51:11 +02:00
Fabien Poussin 1ba09f4d62
Merge pull request #302 from KarlK90/update-risc-v-eclic-for-chibios-21.6
[RISC-V] Update RISC-V ECLIC port for chibios-21.6.x
2022-02-06 23:21:36 +01:00
zykrahgaming 6b5576f2ad Reverted previous commit, not required. 2022-01-01 23:38:02 +11:00
zykrahgaming be8d2d4586 Added #include <stdbool.h> to a file 2022-01-01 23:35:34 +11:00
zykrahgaming 0e9101099e Forgot to remove #include 2022-01-01 23:26:02 +11:00
zykrahgaming a186e6796b Found the issue, changed ch. to currcore-> 2022-01-01 23:21:58 +11:00
zykrahgaming bbf65ff513 Another attempt to fix ch error 2022-01-01 22:35:09 +11:00
zykrahgaming 5a8841252c Testing 2022-01-01 22:14:47 +11:00
zykrahgaming 058c358954 Testing replacing <> with "" 2022-01-01 22:02:09 +11:00
zykrahgaming 51b16df374 Fixed missing include 2022-01-01 21:55:22 +11:00
Stefan Kerkmann c793ac7a60 Update RISC-V ECLIC port for chibios-21.6.x 2021-09-22 18:08:13 +02:00
Fabien Poussin 32bcb42776
Merge pull request #299 from hanya/picolinker
RP2040: Add linker script for FLASH with boot2
2021-09-18 12:44:00 +02:00
Fabien Poussin 6421c89c61
Merge pull request #297 from fauxpark/k60f-improvements
K60x improvements
2021-09-18 12:34:16 +02:00
Hanya 48218bd9ef RP2040: Add linker script for FLASH with boot2 2021-09-14 18:26:05 +09:00
Joy cc5a81bf99 Added WB32F3G71xx support 2021-09-12 18:02:41 -03:00
fauxpark 4b24d2e9c0 K60F improvements 2021-09-12 02:59:33 +10:00
Stefan Kerkmann 8e86276eb8 Add startup code to the vectors section
The startup code that initializes the mcu is moved to be the first entry
in the vectors section, so it will always be the first to run after a reset.

Because of a typo the vector table would have been there, but was relocated
into the text section. So this setup compiled by sheer luck into a working executable
that had the _start function at the flash base (0x8000000) up to this point.
2021-09-07 00:02:25 +02:00
Fabien Poussin 3fc7254ad3
Merge pull request #280 from fauxpark/kinetis-ldscripts
Add flash4-7 to MK64FX512 and MK66FX1M0 ldscripts
2021-06-30 10:06:06 +02:00
fauxpark c9d507e687 Add flash4-7 to MK64FX512 and MK66FX1M0 ldscripts 2021-05-14 21:58:12 +10:00
Stefan Kerkmann b5d78c64c4 Add RV32E support
* Make SP 16 byte aligned as the risc-v abi wants it.
* Correct IRQ context check.
2021-05-10 10:16:54 +02:00
Stefan Kerkmann 5e096e01c9 Context switch only on irq tail 2021-05-09 11:16:09 +02:00
Stefan Kerkmann 0a66a0660b Fix t0 restore when exiting interrupt
An oversight when arrangeing the code according to the nucleisys docs,
t0 was overriden with the value of msubm and never actually restored. To
fix the issue we restore the csrs after the general purpose registers.
The offical docs want it the other way around but this should be fine as
well, as the interrupts are still globaly disabled at this point.
2021-04-25 13:23:47 +02:00
Stefan Kerkmann 9a64f5c17c Force machine mode on interrupt exit for context switches
The first attempt to solve illegal instruction expections was made in commit
b875108cd0
 It seemed as this "fixed" the issue, but merely added delays in the code
 which prevented the error to appear in lucky circumstances. Interesting that this code worked in the first place.

Root cause for the expections where write attempts to mstatus in
user privilege mode which raised the illegal instruction exception which
is in spec with the risc-v privileged isa and documented in the
bumbleebee core architecture manual by nucleisys. The solution is
to never enter user mode by forceing mcause.mpp to 0x3
before calling mret when exiting the interrupt handler
for context switching.
2021-04-17 19:36:44 +02:00
Stefan Kerkmann c1dfb65aa0 Revert "Add R/W memory and instruction barrier after mstatus access"
This reverts commit b875108cd0.
2021-04-16 21:52:41 +02:00