lib: Update to latest can2040 code

Clear PIO irq flags in pio_sm_setup()
Set TXPENDING during pio_sm_setup()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-11-23 11:59:24 -05:00
parent 9727f00e50
commit 1b56a63abf
2 changed files with 3 additions and 1 deletions

View File

@ -146,4 +146,4 @@ used to upload firmware to devices flashed with the CanBoot bootloader.
The can2040 directory contains code from: The can2040 directory contains code from:
https://github.com/KevinOConnor/can2040 https://github.com/KevinOConnor/can2040
revision 53c09fb06a8eac90a6941e988d09d08b8e16ba78. revision 177b0073fe6f19281ee7f7fdbe9599e32d1b4b8b.

View File

@ -347,6 +347,8 @@ pio_sm_setup(struct can2040 *cd)
pio_hw_t *pio_hw = cd->pio_hw; pio_hw_t *pio_hw = cd->pio_hw;
pio_hw->ctrl = PIO_CTRL_SM_RESTART_BITS | PIO_CTRL_CLKDIV_RESTART_BITS; pio_hw->ctrl = PIO_CTRL_SM_RESTART_BITS | PIO_CTRL_CLKDIV_RESTART_BITS;
pio_hw->fdebug = 0xffffffff; pio_hw->fdebug = 0xffffffff;
pio_hw->irq = 0xff;
pio_signal_set_txpending(cd);
// Load pio program // Load pio program
int i; int i;