Repository navigation
Disable interrupts while doing flash_op, explicit_buy, and chain_image - #1835
Conversation
|
You should use this |
|
Added - but this does now add a dependency on |
|
I think that is probably OK (it doesn't necessarily pull in that much by default - you could check) ... or perhaps it makes more sense to move the bootrom wrapper funcs for this into flash.h - perhaps i'm leaning towards the latter |
|
I think that the |
| int *res; | ||
| } flash_op_params_t; | ||
|
|
||
| static void flash_op_helper(void *param) { |
There was a problem hiding this comment.
should be inline - likely to cause compile errors depending on compiler
|
We either need to a) make the struct.typedef and helper function names a bit more scoped or outline this stuff into the C file |
|
I've inlined the helpers, and renamed them (eg |
For
flash_opandexplicit_buy, disable interrupts if running a flash binary. This prevents calling interrupt routines in flash while the flash is being accessed directly (eg whenexplicit_buydoes a flash erase), which would cause a bus fault. I haven't added the same to the other flash functions, because those are generally lower-level, whereasflash_opis a higher-level function so it's nice to be able to call it without additional configuration.For
chain_image, always disable interrupts before chaining, to prevent interrupt routines interrupting the chaining.