add checks for DMA cache synchronisation function
Posted: Wed Apr 24, 2019 4:09 pm
Hello,
More than one, I have been trapped by calling cacheBufferInvalidate or cacheBufferFlush with an unproperly aligned address. Is it possible to add an chDbgAssert in these 2 functions, that check that the 5 LSB of address are clear ?
The effects of passing unaligned address can go from subtle bug to hard hardware fault with smashed stack where debugger is of no help.
Alexandre -
More than one, I have been trapped by calling cacheBufferInvalidate or cacheBufferFlush with an unproperly aligned address. Is it possible to add an chDbgAssert in these 2 functions, that check that the 5 LSB of address are clear ?
The effects of passing unaligned address can go from subtle bug to hard hardware fault with smashed stack where debugger is of no help.
Alexandre -