A strange problem about download and debug

619772263@qq.com gravatar image

asked 2017-10-13 07:07:54 +0100

Hello, I made some boards on nrf52832 and I was testing the PCB.

The test program is ..\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral\ble_app_hrs.

(I have downloaded the softdevice s132 3.0.0)

Here the appearance as follows:

  • In debug mode:

image description and run, everything is fine.

  • In download mode:

image description image description

can scan the advertise, but can't connect.

So I add uart to print some error message in download mode. And I find it will run into app_error_fault.

void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
{
    error_info_t* error_info = (error_info_t*)info;
    memset(error_buffer, 0x00, sizeof(error_buffer));
    printf(
            "app_error file_name: %s, line_num: %d, err_code: %08X\r\n",
            error_info->p_file_name, error_info->line_num, error_info->err_code
            );
}

And the uart print message is :

app_error file_name: KGJ`h侒園h, line_num: 1024, err_code: 00000579

But I can't find any error code about 579. What is the reason?

Is the chip wrong or my board design? Or else?

I need you help!

edit retag flag offensive close delete report spam

Comments

If I comment power_manage();

it run well both in Debug and direct download mode.

What's wrong? So confuced...

fanleung ( 2017-10-14 11:38:13 +0100 )editconvert to answer

Hi fanleung. So the HRS example works fine when you debug? But not when pressing download?
And when you comment out power_manage(); it works fine for both? Did you make any modifications to the code?

Joakim Jakobsen ( 2017-10-17 08:52:26 +0100 )editconvert to answer

Hi, jakobsen. I didn't make any modifications to the HRS.

But I fould the problem out. My SDK is 12.0.0 and the pack is 8.7.1.

When I update the newest, it run well both Debug and download mode.

The Errata No.108: “RAM content cannot be trusted upon waking up from System ON Idle or System OFF mode”

fanleung ( 2017-10-17 09:03:06 +0100 )editconvert to answer

I'm happy you were able to solve the problem.
Thanks for sharing the solution.

Joakim Jakobsen ( 2017-10-17 09:05:53 +0100 )editconvert to answer

This problem bothered me few day...

In the production, some of the chip performance is normal, but few are so strange.

I think it is necessary to update SDK, sd and pack frequently...

fanleung ( 2017-10-17 09:16:40 +0100 )editconvert to answer

Yes, I would really recomment to use the latest SDK with support for your device. As you are using the nRF52832 the latest version is SDK v.14.0.0.

Joakim Jakobsen ( 2017-10-17 10:01:52 +0100 )editconvert to answer