Skip to content

Loading builds...

Changes

#147 (Mar 18, 2026, 6:41:34 PM)

dfu: set poll timeout to 128 ms to reduce EPIPE errors

The previous 10 ms poll timeout creates ERROR_PIPE errors when the
octsim is connected to a more busy bus.
E.g. when a network device is connected to the same bus or when flashing
multiple OCTSIMs at the same time.

From usb captures 70 ms should be already enough, but adding an additional
safety margin.
It is unclear why the EPIPE errors happens.

Related: SYS#7910
Change-Id: I4abe812e17194f37ce5d97fd1d866aeebd1d4239
lynxis at

#146 (Mar 11, 2026, 2:59:25 PM)

dfu: download: align download data buffer

The download data buffer is given to the usb stack.
Ensure the data buffer is dma capable to prevent an
additional memcpy() by the usb hal.

Change-Id: I01191a125aa62c2198e38d5e5fcd27d4e421c62e
lynxis at

#145 (Mar 11, 2026, 2:18:04 PM)

Errata 2.6.10: enable watchdog on boot

Previous the code was enabling the watchdog window on boot,
but not the watchdog as the errata specified.
It seems WDT EN and WDT WEN got accidental swapped.

Ensure the watchdog window mode is disabled, because
it might prevent us from disabling it again.
Use the hal defines which also describes the function
of the bits.

Change-Id: I581037724d19fb5abd0c5067f16a5769f9e264a7
lynxis at

#144 (Mar 11, 2026, 12:10:15 PM)

Replace snprintf() to free 4 kb

Change-Id: Ide644648bda86d4ae77a6713d1e140a4b78ba835
lynxis at

#143 (Mar 11, 2026, 12:10:15 PM)

dfu: MANIFEST_SYNC: stay in MANIFEST_SYNC when manifestationIntolerant & completed

In theory a device which is manifestintolerant and completed the manifestation should
not reach MANIFEST_SYNC again.

Remove the state transistion to WAIT-RESET and stay in the current state and
wait for the main loop to change the state is safer.

Change-Id: I8c34a18e2336731126a8c01070d86e2547578e3d
lynxis at

#142 (Mar 11, 2026, 12:10:14 PM)

dfu: download: make variables between IRQ and main loop volatile

Both are access by IRQ and mainloop and are written by the IRQ handler.

Change-Id: Ic3dccd77eff7feb164f9f07047680eef3f7c2516
lynxis at

#141 (Mar 11, 2026, 12:10:14 PM)

dfu: flash: protect parsing of rc of flashing

Otherwise it is not guaranteed that both dfu_status and dfu_state
are in sync when the IRQ handler is running.

Change-Id: Ifc0d56d779ec31382855d6c367478104bc04e1e7
lynxis at

#140 (Mar 11, 2026, 12:10:14 PM)

dfu: protect USB_DFU_STATE_DFU_MANIFEST by a critical section

In the MANIFEST state, the IRQ won't move the state, but
to prevent incosistency between dfu_manifestation_complete &
dfu_state, use a critical section.

Change-Id: Idf5fb7d55b4051ba7e235dfa409a4de18a8f208c
lynxis at

#139 (Mar 11, 2026, 12:10:14 PM)

dfu: download: flash the first block in manifest phase

To prevent half flashed applications, erase the first page
when dfu downloading starts and save the first block for later.
In manifest stage, flash the first block.
If the first 4 byte are 0xffffffff, the board won't boot
into application and go into the dfu bootloader.

Change-Id: I894f3ee71587ccb287e92d7025039954991c631f
lynxis at

#138 (Mar 10, 2026, 5:16:54 PM)

dfu: MANIFEST_SYNC: stay in MANIFEST_SYNC when manifestationIntolerant & completed

In theory a device which is manifestintolerant and completed the manifestation should
not reach MANIFEST_SYNC again.

Remove the state transistion to WAIT-RESET and stay in the current state and
wait for the main loop to change the state is safer.

Change-Id: I8c34a18e2336731126a8c01070d86e2547578e3d
lynxis at

#137 (Mar 10, 2026, 5:16:54 PM)

dfu-download: flash the first block in manifest phase

To prevent half flashed applications, erase the first page
when dfu downloading starts and save the first block for later.
In manifest stage, flash the first block.
If the first 4 byte are 0xffffffff, the board won't boot
into application and go into the dfu bootloader.

Change-Id: I894f3ee71587ccb287e92d7025039954991c631f
lynxis at

#136 (Mar 10, 2026, 5:16:54 PM)

dfu: rewrite firmware downloading

Improve handling of dfu_state by moving more state changing towards the
IRQ handler. Having both the main loop and IRQ changes dfu_state within
the same state could lead to races.

The main loop is now only a simple worker which reports back via dfu_flash_done &
dfu_flash_status.

Change-Id: I345d5948455b25cd8a2efb1abfd9d0986ebd8cef
lynxis at

#135 (Mar 10, 2026, 5:16:54 PM)

Replace snprintf() to free 4 kb

Change-Id: Ide644648bda86d4ae77a6713d1e140a4b78ba835
lynxis at

#134 (Mar 10, 2026, 5:16:53 PM)

dfu: protect USB_DFU_STATE_DFU_MANIFEST by a critical section

In the MANIFEST state, the IRQ won't move the state, but
to prevent incosistency between dfu_manifestation_complete &
dfu_state, use a critical section.

Change-Id: Idf5fb7d55b4051ba7e235dfa409a4de18a8f208c
lynxis at

#133 (Mar 10, 2026, 10:49:42 AM)

Errata 2.6.10: enable watchdog on boot

Previous the code was enabling the watchdog window on boot,
but not the watchdog as the errata specified.
It seems WDT EN and WDT WEN got accidental swapped.

Use the hal defines which also describes the function
of the bits.

Change-Id: I581037724d19fb5abd0c5067f16a5769f9e264a7
lynxis at

#132 (Mar 10, 2026, 10:45:04 AM)

Errata 2.6.10: enable watchdog on boot

Previous the code was enabling the watchdog window on boot,
but not the watchdog as the errata specified.
It seems WDT EN and WDT WEN got accidental swapped.

Use the hal defines which also describes the function
of the bits.

Change-Id: I581037724d19fb5abd0c5067f16a5769f9e264a7
lynxis at

#131 (Mar 10, 2026, 10:45:03 AM)

Improve comments on errata 2.6.10

Errata 2.6.10 affects Rev A, D, F: The cache lines
of AHB0 and AHB1 might not reset properly on Power up
resulting in courrupted data in rare cases.

The errata recommends fixing this by:
- for AHB0: start WDT by NVMEM and disable by ARM core.
- for AHB1: disable and re-enable cache line

Change-Id: I3c35f590a4e43d778e70f2f377e0d470c3a652b2
lynxis at

#130 (Mar 10, 2026, 12:17:18 AM)

Improve comments on errata 2.6.10

Errata 2.6.10 affects Rev A, D, F: The cache lines
of AHB0 and AHB1 might not reset properly on Power up
resulting in courrupted data in rare cases.

The errata recommends fixing this by:
- for AHB0: start WDT by NVMEM and disable by ARM core.
- for AHB1: disable and re-enable cache line

Change-Id: I3c35f590a4e43d778e70f2f377e0d470c3a652b2
lynxis at

#129 (Mar 10, 2026, 12:17:18 AM)

Errata 2.6.10: enable watchdog on boot

Previous the code was enabling the watchdog window on boot,
but not the watchdog as the errata specified.
It seems WDT EN and WDT WEN got accidental swapped.

Use the hal defines which also describes the function
of the bits.

Change-Id: I581037724d19fb5abd0c5067f16a5769f9e264a7
lynxis at

#128 (Mar 6, 2026, 9:31:16 AM)

dfu-download: flash the first block in manifest phase

To prevent half flashed applications, erase the first page
when dfu downloading starts and save the first block for later.
In manifest stage, flash the first block.
If the first 4 byte are 0xffffffff, the board won't boot
into application and go into the dfu bootloader.

Change-Id: I894f3ee71587ccb287e92d7025039954991c631f
lynxis at

#127 (Mar 6, 2026, 9:18:10 AM)

dfu-download: flash the first block in manifest phase

To prevent half flashed applications, erase the first page
when dfu downloading starts and save the first block for later.
In manifest stage, flash the first block.
If the first 4 byte are 0xffffffff, the board won't boot
into application and go into the dfu bootloader.

Change-Id: I894f3ee71587ccb287e92d7025039954991c631f
lynxis at

#126 (Mar 5, 2026, 10:18:46 PM)

Replace snprintf() to free 4 kb

Change-Id: Ide644648bda86d4ae77a6713d1e140a4b78ba835
lynxis at

#125 (Mar 5, 2026, 10:18:41 PM)

dfu-download: flash the first block in manifest phase

To prevent half flashed applications, erase the first page
when dfu downloading starts and save the first block for later.
In manifest stage, flash the first block.
If the first 4 byte are 0xffffffff, the board won't boot
into application and go into the dfu bootloader.

Change-Id: I894f3ee71587ccb287e92d7025039954991c631f
lynxis at

#124 (Mar 5, 2026, 10:15:20 PM)

Makefile: on clean: remove dfu & flash .o & .d files

Change-Id: I9705f15c41ea0df8b8486b6326264db36f797dd8
lynxis at

#123 (Mar 5, 2026, 10:14:32 PM)

dfu-download: flash the first block in manifest phase

To prevent half flashed applications, erase the first page
when dfu downloading starts and save the first block for later.
In manifest stage, flash the first block.
If the first 4 byte are 0xffffffff, the board won't boot
into application and go into the dfu bootloader.

Change-Id: I894f3ee71587ccb287e92d7025039954991c631f
lynxis at

#122 (Mar 5, 2026, 10:14:30 PM)

Replace snprintf() to free 4 kb

Change-Id: Ide644648bda86d4ae77a6713d1e140a4b78ba835
lynxis at

#121 (Mar 5, 2026, 11:55:13 AM)

WIP: dfu-download: flash the first block into manifest phase

To prevent half flashed applications, erase the first page
when dfu downloading starts and save the first block for later.
In manifest stage, flash the first block.
If the first 4 byte are 0xffffffff, the board won't boot
into application and go into the dfu bootloader.

TODO: Needs testing.

Change-Id: I894f3ee71587ccb287e92d7025039954991c631f
lynxis at