Hi,
I am learning how to write and read from flash memory on nRF52833 dev board for a BLE application.
I followed the heart rate example as shown in https://devzone.nordicsemi.com/f/nordic-q-a/32208/what-should-i-start-in-order-to-use-the-maximum-memory-space-in-fstorage.
If I try to write an uint_8 data I get the error FDS_ERR_UNALIGNED_ADDR. Only 32 bits works ok.
could you help me understand why please?
Many thanks
Please find attached the fds write function I am using.
static ret_code_t fds_test_write(void)
{
static uint32_t const m_deadbeef[2] = {1,2};
//static float const m_deadbeef[2] = {0.1, 2256.5};
fds_record_t record;
fds_record_desc_t record_desc;
// Set up data.
// Set up record.
record.file_id = FILE_ID_FDS_TEST;
record.key = REC_KEY_FDS_TEST;
record.data.p_data = &m_deadbeef;
//record.data.length_words = sizeof(m_deadbeef)/sizeof(uint16_t);
record.data.length_words = sizeof(m_deadbeef)/sizeof(uint32_t);
NRF_LOG_INFO("Length = %d \r\n",record.data.length_words);
ret_code_t ret = fds_record_write(&record_desc, &record);
if (ret != NRF_SUCCESS)
{
return ret;
}
NRF_LOG_INFO("Writing Record ID = %d \r\n",record_desc.record_id);
return NRF_SUCCESS;
}