This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to debug, unable to printf to see errcode

Per my another question:

devzone.nordicsemi.com/.../

I have taken the kind advice of Bjørn Spockeli but to no avail.

I tried this solution to enter debug mode: devzone.nordicsemi.com/.../

I followed every step, could enter the debug mode, but the application just wouldn't run. The board, when running correctly, should have LED activities. But in debug mode, there is none. Even after I hit the "rest" and "run" button, nothing. I press the button on the board, nothing happens.

So I tried to printf my way out. Still failed. I placed a printf right after the uart initiation, it worked perfectly, but when I placed it after this line: (refer to my previous question:devzone.nordicsemi.com/.../)

err_code = sd_ble_gatts_hvx(m_conn_handle, &hvx_params); printf ((uint8_t)err_code); APP_ERROR_CHECK(err_code);

it didn't really work. I assumed that err_code, a 32bit unsigned, will be shortened to 8bit that way, I was partially right, because it did output, but out of the 8 cycles that I mentioned in that previous question, only 1 printf will be shown instead of 8. And the only one that got outputted was a "C0", which doesn't really match any err_code at all, if it were "C" out of the "C0" that counts, then it meant I didn't assign the right data size, again, that doesn't really make sense.

I'm running out of ideas, can people here please help me... again? Feed me a bone!

Also, do I have other ways to send data, long data, other than the notification kind of packet?

Erik

Parents Reply Children
Related