| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
|
|
|
|
|
|
|
| |
This adds the bootrom code needed to implement "reboot into
bootloader" and "chipid" capabilities.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This is in preparation for rp2350 support.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
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>
|