I am trying to understand if the DMA of the USB-FS on the MK22FN512VLH12 would transfer a 32-bit long integer as a whole (atomically) as seen from the point of view of the MCU.
For instance let's say the MCU is reading a 32-bit long integer from memory. At the same time the USB-FS DMA is writing that same long-int (during a USB OUT request). Is it possible for the MCU to be reading that long-int after the USB-FS has written part of it, but not all of it, thereby reading a corrupted value?
Or would the DMA of the USB-FS write the whole 32-bit at once - as would be the case if the 32-bit transfer occurs as one atomic transfer on a 32-bit bus?
Same thing in reverse: If the USB-FS is reading from a long-int in memory (during a USB IN request) while the MCU is writing that long-int, is it possible for the USB-FS to read part of the long-int before the MCU write and the other part after the MCU write, thereby reading a corrupted value? Or will the USB-FS perform the 32-bit read as one atomic transfer on a 32-bit bus?