Skip to content

Loading builds...

Changes

#98 (Feb 22, 2026, 8:44:41 PM)

dfu: usb_dfu() convert if() intos switch/case

Improves the overview of the handled states.
No functional change.

Change-Id: Ie0abcdb51612598e77cacf7772276919ded17d5a
lynxis at

#97 (Feb 22, 2026, 8:44:40 PM)

dfu: irq: replace if(states) with a switch case

Improves the overview. No functional change.

Change-Id: Ic32fe16dff4b7bb933ec62e36a9c7c7829aece1b
lynxis at

#96 (Feb 22, 2026, 8:44:40 PM)

dfu: irq: GET_STATUS: set state before sending it

The DFU spec, v1.1: "6.1.2 DFU_GETSTATUS Request" states the
GET_STATUS should contain the state,
to which the device transistions to after processing this message.

Change-Id: I6d28404d6936f7ea79fcee90f0c8191f0f623ad8
lynxis at

#95 (Feb 22, 2026, 8:44:40 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

#94 (Feb 22, 2026, 8:44:40 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

#93 (Feb 22, 2026, 8:44:40 PM)

dfu: mainloop: work on a local copy of dfu_state

Prevent race conditions between main loop and irq.
Copy at the start of the loop the dfu state and work on it.

Change-Id: Ic146c8fa5ba25425cf785bae66f9c99b0faab944
lynxis at

#92 (Feb 22, 2026, 8:44:39 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

#91 (Feb 22, 2026, 8:44:39 PM)

dfu: MANIFEST: mainloop: wait 5 ms before handling the state

Gives the USB stack some time to deliver the last USB message before
going through the state machine which might end in a too quick system reset.

Change-Id: If9178120eed46f75089abf1898db3176cce93df2
lynxis at

#90 (Feb 22, 2026, 8:36:03 PM)

dfu: MANIFEST: mainloop: wait 5 ms before handling the state

Gives the USB stack some time to deliver the last USB message before
going through the state machine which might end in a too quick system reset.

Change-Id: If9178120eed46f75089abf1898db3176cce93df2
lynxis at

#89 (Feb 22, 2026, 8:36:02 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

#88 (Feb 22, 2026, 8:36:02 PM)

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: WDT enable & disable
- for AHB1: disable and re-enable cache line

Change-Id: I3c35f590a4e43d778e70f2f377e0d470c3a652b2
lynxis at

#87 (Feb 22, 2026, 8:36:01 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

#86 (Feb 22, 2026, 8:36:01 PM)

dfu: usb_dfu() convert if() intos switch/case

Improves the overview of the handled states.
No functional change.

Change-Id: Ie0abcdb51612598e77cacf7772276919ded17d5a
lynxis at

#85 (Feb 22, 2026, 8:36:01 PM)

dfu: mainloop: work on a local copy of dfu_state

Prevent race conditions between main loop and irq.
Copy at the start of the loop the dfu state and work on it.

Change-Id: Ic146c8fa5ba25425cf785bae66f9c99b0faab944
lynxis at

#84 (Feb 22, 2026, 8:36:00 PM)

dfu: make dfu_state/dfu_status volatile

Both variable might be changed from IRQ and from main loop.

Change-Id: I7ad5255064917c203cebe5ab54a5d457baa2f5ed
lynxis at

#83 (Feb 22, 2026, 8:36:00 PM)

dfu: irq: replace if(states) with a switch case

Improves the overview. No functional change.

Change-Id: Ic32fe16dff4b7bb933ec62e36a9c7c7829aece1b
lynxis at

#82 (Feb 22, 2026, 8:36:00 PM)

dfu: irq: GET_STATUS: set state before sending it

The DFU spec, v1.1: "6.1.2 DFU_GETSTATUS Request" states the
GET_STATUS should contain the state,
to which the device transistions to after processing this message.

Change-Id: I6d28404d6936f7ea79fcee90f0c8191f0f623ad8
lynxis at

#81 (Feb 22, 2026, 8:35:59 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