Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ISP programming with checksum 0x00 #5

Merged
merged 3 commits into from
Mar 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions picotiny/fw/fw-brom/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PROJ_NAME=fw-brom
DEBUG=no
BENCH=no
COMPACT=no
COMPACT=yes
MULDIV=no
COMPRESSED=no

Expand Down Expand Up @@ -34,7 +34,7 @@ ifeq ($(DEBUG),yes)
endif

ifeq ($(DEBUG),no)
ifeq ($(COMPACT),yew)
ifeq ($(COMPACT),yes)
CFLAGS += -g -O2
else
CFLAGS += -g -O3
Expand Down
20 changes: 10 additions & 10 deletions picotiny/fw/fw-brom/isp_flasher.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
#include <stdbool.h>

typedef struct {
volatile uint32_t DATA;
volatile uint32_t CLKDIV;
volatile uint32_t DATA;
volatile uint32_t CLKDIV;
} PICOUART;

typedef struct {
volatile uint32_t OUT;
volatile uint32_t IN;
volatile uint32_t OE;
volatile uint32_t OUT;
volatile uint32_t IN;
volatile uint32_t OE;
} PICOGPIO;

typedef struct {
Expand Down Expand Up @@ -69,7 +69,7 @@ inline uint8_t spi_trbyte(uint8_t txdata) {
QSPI0->IO = spi_io;
txdata = (txdata << 1) | ((QSPI0->IO & QSPI_IO_MISO) >> 1);
}
return txdata;
return txdata;
}

void spi_flashio(uint8_t *pdata, int length, int wren) {
Expand Down Expand Up @@ -140,7 +140,7 @@ int main()

if (waitcnt == FW_WAIT_MAXCNT) {
void (*flash_vec)(void) = (void (*)(void))(0x00000000);
goto *flash_vec;
flash_vec();
}

while (1) {
Expand Down Expand Up @@ -215,10 +215,10 @@ int main()

// Jump to reset vector
void (*rst_vec)(void) = (void (*)(void))(0x80000000);
goto *rst_vec;
rst_vec();
break;
default:
break;
default:
break;
}
}
}
Loading