aboutsummaryrefslogtreecommitdiffstats
path: root/src/rp2040/main.c
Commit message (Collapse)AuthorAgeFilesLines
* rp2040: Prefer larger postdiv1 on rp2040 chipsKevin O'Connor2025-06-021-2/+2
| | | | | | | The rp2040 uses a pll vco divider of 6. Prefer setting postdiv1=6 and postdiv2=1 (instead of the previous postdiv1=3 and postdiv2=2). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add comments on PLL frequency requirements to clock setup codeKevin O'Connor2025-06-021-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Fix build of rp2350Kevin O'Connor2025-02-261-6/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: set clock to 200MhzTimofey Titovets2025-02-261-2/+18
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* rp2040: Add rp2350 bootrom based chipid and reboot to bootloader codeKevin O'Connor2024-11-141-3/+1
| | | | | | | This adds the bootrom code needed to implement "reboot into bootloader" and "chipid" capabilities. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Move chipid reading to bootrom.cKevin O'Connor2024-11-141-1/+1
| | | | | | | | | | | Rewrite chipid.c so that it contains just the USB and canbus id manipulation code. Move the low-level chipid reading to bootrom.c. Also, introduce a new bootrom_reboot_usb_bootloader() function in bootrom.c so that the main.c code does not need to know the specifics of rebooting into the bootrom. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Initial rp2350 supportKevin O'Connor2024-11-141-3/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Use a higher USB PLL internal frequencyKevin O'Connor2024-11-141-1/+5
| | | | | | | The rp2350 chip requires a higher internal frequency, so choose a value that works for both rp2040 and rp2350. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Rename rp2040_link.lds.S to rpxxxx_link.lds.SKevin O'Connor2024-11-131-1/+1
| | | | | | This is in preparation for rp2350 support. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Load vectortable into ramKevin O'Connor2024-01-251-0/+21
| | | | | | | Load the interrupt vector table into ram at startup. This reduces the chance of a flash cache access causing timing instability. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Move watchdog code to new watchdog.c fileKevin O'Connor2022-12-141-25/+0
| | | | | | | Move the watchdog code to its own file so that it is easier to disable it for development builds. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Fix watchdog enableKevin O'Connor2022-11-191-0/+3
| | | | | | | | | | | | The rp2040 watchdog does not actually reset anything by default. The psm_hw->wdsel field must be programmed to actually get a reset on a watchdog failure. Program that field so the watchdog is usable. Also, disable the watchdog before attempting a reboot into the bootloader. Otherwise the machine may just reboot a second time due to a missed watchdog event in the bootloader. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Support CanBoot as bootloaderKevin O'Connor2022-11-081-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Rename usb_request_bootloader() to bootloader_request()Kevin O'Connor2022-07-291-0/+14
| | | | | | | Rename this board API function to a more generic name. This is in preparation for calling the function from the canbus code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Initial USB supportKevin O'Connor2021-07-041-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Add initial adc supportKevin O'Connor2021-07-041-1/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Add initial support for the rp2040 mcuKevin O'Connor2021-07-041-0/+149
Support the rp2040 (as tested on a Raspberry Pi Pico board). This adds basic uart, timer, gpio, and watchdog support. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>