CYW20706 wiced_hal_write_nvram is fail

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
hyhw_4628441
Level 2
Level 2
50 sign-ins 10 questions asked 25 sign-ins

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?

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hello @hyhw_4628441 

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. 

Regards,

Anjana

View solution in original post

0 Likes
9 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hello @hyhw_4628441 

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. 

Regards,
Anjana

0 Likes

SW Information

- 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.

20211109_101505_1.jpg

so, i follow to description of "wiced_result_t" is as below.

20211109_101505_2.jpg

in here, i follow to BT_RESULT_LIST as below.

20211109_101505_3.jpg

i can not find the description about error of 0x04. could you let me know that is it right?

0 Likes
lock attach
Attachments are accessible only for community members.

hello, Anjana

could you review the problem?

i copied a part of my source code. its a  "sour_code.docx"

and result is  "Debug_log.docx"

could you review this?

 

thanks

0 Likes

Hi hyhw,

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.

Thanks,

Liam

0 Likes

Hi, Liam

 

I want to know what is mean the 0x04 that is returned when API is failed.

could you let me know that mean?

 

thanks.

 

0 Likes

Hi hyhw,

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,

Liam

0 Likes

Hi, Liam

 

thanks for reply.

but i have more question.

could you let me know solution how to fix when error occurred about 0x04?

 

thanks.

0 Likes

Hi hyhw,

Please check it first with ref. board and the original spp application. And then check it, if the spp is working with your board.

Thanks,

Liam

0 Likes
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hello @hyhw_4628441 

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. 

Regards,

Anjana

0 Likes