i used the API of "wiced_hal_write_nvram" for write to nvram about 132byte.
but, sometimes it is fail with 0x004 error code.
my code is as below.
bytes_written = wiced_hal_write_nvram( 0x01, sizeof(setting_t), setting, &result);
and if i use the API "wiced_hal_write_nvram" for write to nvram, result is repeat as below.
save_setting(result: 4, written: 0)
save_setting(result: 0, written: 132)
where is the result of API of "wiced_hal_write_nvram"?
i want to know what is mean the result is 4. could you help me?
For the wiced_hal_write_nvram API description, please refer wiced_hal_nvram.h file.
@param[out] p_status : Pointer to location where status of the call is returned
Are you using 20706 EVAL or custom board ? In your problem description, you have mentioned the failure is happening only some times. Can you please elaborate ?
How often or how are you calling the API in your application?
Is this error happening when you trying to the same VSID location ? Did you tried different VSID locations?
Can you please give us more details on the issue? or please provide the code snippet to review at our side.
- Chipset & EVK : CYW20706 & F1DC2076 EVB (made in F1media)
- WICED SDK version : WCIED 6.2.1
- Test application : SPP
i want to use the same VSID. i`ve write the same data of structure to that VSID.
i found the description about API of wiced_hal_write_nvram as below.
so, i follow to description of "wiced_result_t" is as below.
in here, i follow to BT_RESULT_LIST as below.
i can not find the description about error of 0x04. could you let me know that is it right?
This is liam@uniquest.
As you know, already wiced_hal_write_nvram() API is used to spp application. So, firstly you need to check if this issue happens to using CYW920706WCDEVAL and default spp application.
If not happens, then you should check it with your board and default spp application.
I want to know what is mean the 0x04 that is returned when API is failed.
could you let me know that mean?
You can refer to following define in wiced_result.h. The 0x04 error code is just "Error".
#define WICED_RESULT_LIST( prefix ) \
RESULT_ENUM( prefix, SUCCESS, 0 ), /**< Success */ \
RESULT_ENUM( prefix, PENDING, 1 ), /**< Pending */ \
RESULT_ENUM( prefix, TIMEOUT, 2 ), /**< Timeout */ \
RESULT_ENUM( prefix, PARTIAL_RESULTS, 3 ), /**< Partial results */ \
RESULT_ENUM( prefix, ERROR, 4 ), /**< Error */ \
But I have no idea the root cause, it's shown just "ERROR".
thanks for reply.
but i have more question.
could you let me know solution how to fix when error occurred about 0x04?
Please check it first with ref. board and the original spp application. And then check it, if the spp is working with your board.
As liam suggested, did you get a chance to test your code on our EVAL board? where you able to reproduce the problem on our EVAL board?
If problem exists only on your custom board, can you please provide us the details on which flash you are using ? Also suggest you to have a schematics / PCB review.