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

AIROC™ Wi-Fi and Wi-Fi Bluetooth Combos

NiMc_1688136
Level 5
50 replies posted 25 likes received 25 replies posted
Level 5

My application sends JSON strings over MQTT and in some rare conditions devices will send a JSON string containing a corrupted Key. 

 

For example,

cJSON_AddItemToObject(body, "timestamp", "123456");

In this example, maybe the timestamp key is sent as tim3stamp.

In this case, a power cycle is required to restore proper messaging.

Since all everything is executed from RAM on the CYW43907, i believe constants are being randomly corrupted or overwritten. 

Is there a way to setup the MPU to protect a section of memory for constants?

0 Likes
1 Reply
MuraliR_36
Moderator
Moderator 250 sign-ins 250 replies posted 100 solutions authored
Moderator

If you are looking at storing constants, can repurposing the AONRAM of the 43907 to store constants be an option for your use case here?

If not, the other way could be modifying the linker scripts to have a section of data constants in the RAM.

0 Likes