TC233 program enter trap 1 TIN 2

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

cross mob
User22498
Level 1
Level 1
First question asked First reply posted Welcome!
Hello,
The memory protection register does not change when entering trap. As shown in the figure below,A2 register changed form address of array kbsw_ws_edm_missing_count_max to the reserved area address 0x0D01F49C of MCU.
So generated memory protection read trap(DSTR.MPE flag).
I want to know what causes the program to enter trap 1 TIN 2?
0 Likes
2 Replies
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
No idea without seeing more of your code, but how are you using WsSensorType[WsChan] as an index to an array, when the values are all 0x8CFFFFEB? kbsw_ws_edm_missing_count_max only has 3 elements, so using 0x8CFFFFEB as an index seems a bit outside of 0...2.
0 Likes
User22498
Level 1
Level 1
First question asked First reply posted Welcome!
UC_wrangler wrote:
No idea without seeing more of your code, but how are you using WsSensorType[WsChan] as an index to an array, when the values are all 0x8CFFFFEB? kbsw_ws_edm_missing_count_max only has 3 elements, so using 0x8CFFFFEB as an index seems a bit outside of 0...2.


Thanks for your response. The program only enter the trap when the power supply injects interference. All value of WsSensorType[] array is 3 ,when the power supply is stable voltage of 12V,All value of WsSensorType[] array form 3 to 0x8CFFFFEB when the power supply enter interference from 5.55V to 12.5V.
The power supply and WsSensorType[] array is shown in the figure below.

0 Likes