Library Modules v2
The modules in libv2
have been ported to be used for both the RP2040 and RP2350. Others are in the works.
Notable changes include, compared to lib
:
Timers.mod
- Support for two timers.
GPIO.mod
- Function numbers are defined in module
MCU2
only, since they differ between the two MCUs. - The pad base configuration is set to input disabled. This is the reset configuration on the RP2350. Note this is the pin’s pad config, not the GPIO device. The IO direction of a GPIO device is configured by selecting a GPIO function. For example, there’s no need to enable the GPIO output (via the corresponding SIO register) for a UART’s transmit pin.
- New procedure to disable the pad isolation for the RP2350.
Exceptions.mod
- API uses interrupt and exceptions numbers as parameters, not a corresponding bit mask, since the RP2350 has more than 32 interrupts.
- Priority is specified as 8 bit value, of which the RP2040 uses the two most significant bits (four priority levels), and the RP2350 three (eight levels).
- Interrupt and exception numbers are defined in module
MCU2
only, since they differ between the two MCUs.
Main.mod
- Adjust UART pin configuration for the changes in module
GPIO
. - RP2350: enable the floating point unit (FPU). Of course, the FPU will only be used if a program is compiled with a compiler that issues the corresponding instructions, such as Astrobe for Cortex-M4.
RuntimeErrors.mod
For the RP2350:
- extend the calculations for the different stack frames when the FPU is used;
- extend the vector table for the additional hardware faults;
- enable the additional hardware faults.
Clocks.mod
- RP2350: use the Ticks device in lieu of the Watchdog for the 1 MHz tick signal for the Timers, SysTick, and Watchdog.
Example Program
- Example program BlinkPlus is adjusted to use the extended module
Timers
. - There are two variants:
- for Pico/RP2040 with one timer device only
- for Pico2/RP2350 with two timer devices
Website
A first round of updated contents:
- Home page
- Configuration for Astrobe
- Start-up sequence description
- Dual-core design considerations
- bin-to-uf2 transmogrifier for Pico2