The _drvat25df.c has a concurrency issue when the SPI interrupt is generated too fast.
Since DRV_AT25DFHandler called by _SPIEventHandler is invoked by the SPI interrupt routine as soon as the transmission is terminated there is an unexpected possibility that the gDrvAT25DFObj.state is modified after the execution of DRV_AT25DFHandler.
In this scenario, __DRV_AT25DFHandler handles the default state because _DRV_AT25DF_STATE_READ_CMDADDR is not implemented.
This issue happens frequently when _DRV_AT25DFRead is called in an RTOS context.
A temporary workaround is to set the state to _gDrvAT25DFObj.state = DRV_AT25DF_STATE_READDATA; before call __DRV_AT25DFWriteMemoryAddress in _DRV_AT25DFRead.
The _drvat25df.c has a concurrency issue when the SPI interrupt is generated too fast.
Since DRV_AT25DFHandler called by _SPIEventHandler is invoked by the SPI interrupt routine as soon as the transmission is terminated there is an unexpected possibility that the gDrvAT25DFObj.state is modified after the execution of DRV_AT25DFHandler. In this scenario, __DRV_AT25DFHandler handles the default state because _DRV_AT25DF_STATE_READ_CMDADDR is not implemented.
This issue happens frequently when _DRV_AT25DFRead is called in an RTOS context.
A temporary workaround is to set the state to _gDrvAT25DFObj.state = DRV_AT25DF_STATE_READDATA; before call __DRV_AT25DFWriteMemoryAddress in _DRV_AT25DFRead.
`bool DRV_AT25DF_Read( const DRV_HANDLE handle, void* rxData, uint32_t rxDataLength, uint32_t address ) { bool isRequestAccepted = false;
}`