Open francisjjp opened 7 years ago
It is needed to fix following function:
`HAL_StatusTypeDef FlashNVM_Read(uint32_t start_address, uint8_t* data_out, uint32_t size) { uint32_t sizeCounter = 0;
// Check input data if (!IS_FLASH_ADDRESS(start_address)) { // It's not Flash's address return HAL_ERROR; } while (sizeCounter < size) { *data_out = (*(__IO uint32_t*)start_address); data_out++; start_address++; sizeCounter++; } return 1;
}`
Line:
*`data_out = ((__IO uint32_t)start_address);`** is wrong. It works in F4 family but not in F0 family.,
The right implementation is this:
*`data_out = ((__IO uint8_t)start_address);`* because data_out points to uint8_t variable.
It is needed to fix following function:
`HAL_StatusTypeDef FlashNVM_Read(uint32_t start_address, uint8_t* data_out, uint32_t size) { uint32_t sizeCounter = 0;
}`
Line:
*`data_out = ((__IO uint32_t)start_address);`** is wrong. It works in F4 family but not in F0 family.,
The right implementation is this:
*`data_out = ((__IO uint8_t)start_address);`* because data_out points to uint8_t variable.