Hi, I'm using smartrf06 board with our two different circuits both with CC2640 5CI package. We developed our firmware using the cc2650EM-7ID and now testing the same firmware with our custom boards. I'm also using ble stack v2.1.1 SimpleBLEBroadcaster with IAR for the application.
I can download and debug the firmware without any problem with one of the custom boards and everything works fine. When I do the exact same process with the second custom board which has the exact same RF configurations, LF clock, HF clock and circuit components, I can still download the firmware (both stack and the applicaiton). The problem is when I try to debug the same firmware with the second circuit I get the following error:
Fatal error: Failed to do step: (Error -2134 @ 0x0) Unable to control device execution state. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.83.1)
I followed the steps from iar_program_start function with the dis-assembly view and found out that the device comes in this state after executing the following line (0x23b6) which is inside the function "HapiTrimDeviceShutdown":
0x23b2: 0xf081 0x0101 EOR.W R1, R1, #1
0x23b6: 0x6081 STR R1, [R0, #0x8]
0x23b8: 0xb914 CBNZ R4, 0x23c0
where R1 = 0x00000001 and R0 = 0x43200000 at that moment.
I do the same steps with the other circuit design, I come to the same line with the exact register values and the code works without giving the same error.
Looking at this, one thinks it must be a board problem but both designs are exactly the same except some IO pins and we don't even mount those components on to the board. We tried everything such as changing the oscillators, using internal oscillator, changing the CC2640 on the circuit to be sure that it's not a defected one but nothing worked so far.
Can anyone help me with what could be the reason for this or what this line of code specifically does so that I can understand what could be the problem?
Thanks in advance.