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

ERROR 3735928559 [Unknown error code] with timer

Hi,
I have made a simple timer function it was working perfectly fine but now it's causing the following issue.
I have removed everything from its handler but still getting the same issue.
Any suggestions, please?

Parents
  • Hello,

    What does app_timer2.c line 162 look like? Did you change anything in there?

    In fact, did you change anything in the app_timer2.c file?

    If not, can you show me all instances where you set up and start your timers? The easiest is probably to just upload the project.

  • Hi Edvin,

    NO, I have nothing changed in the app_timer2.c file.
    I am attaching my Project.

    How to create this error:
    1-Write any value on characteristic no 4 error will occur.

    8473.Project.zip

  • First some general hints while I remember it, as I fix them before testing anything:

    Move ble_nus.c and ble_nus.h from the folder ...\s140\ses to the same folder as main.c

    The way you have included ble_nus.c in your project is correct, but not the way you included ble_nus.h.

    First, you need to remove and add ble_nus.c after you have moved it. Remove it, close the file (ble_nus.c) in SES if you have it open, and open it again.

    Then remove ble_nus.h from the list to the left in SES. This is not how you include .h files. 

    Then in main.c change the line:

    #include "C:\Nordic\SDK\nRF5SDK17009d13099\nRF5_SDK_17.0.0_9d13099\examples\ble_peripheral\custom_ble_service_example\pca10056\s140\ses\ble_cus.h"

    to

    #include "ble_cus.h"

    Then open your project settings, and select "common" from the dropdown menu, go to preprocessor-> User include directories and double click it to open the list. Scroll to the bottom and add a line saying "../../.."

    Then the project should compile again.

    After this, you should see that you get a lot of warnings from ble_cus.c after you compile:

    You shouldn't call functions that are defined in main.c from another file. If you want to do stuff in main, look at the guide that I assume you are following on Github, and look at the section "propagating custom service events to the application" or something like that. You should (!) do this. Compiler warnings like this can lead to unpredictive behavior, like what you are experiencing.

    Please note that these warnings only pop up if the compiler recompiles that specific file. This means that you need to change the file, save and compile again to see what they say.

    Also, these lines:

    uint32_t custom_value_char_add_1(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);
    uint32_t custom_value_char_add_2(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);
    uint32_t custom_value_char_add_3(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);
    uint32_t custom_value_char_add_4(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);
    uint32_t custom_value_char_add_5(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);
    uint32_t custom_value_char_add_6(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);
    uint32_t custom_value_char_add_7(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);
    uint32_t custom_value_char_add_8(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);
    uint32_t custom_value_char_add_9(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);
    uint32_t custom_value_char_add_10(ble_cus_t * p_cus, const ble_cus_init_t * p_cus_init);

    in ble_cus.c should be moved to ble_cus.h.

    Regarding the timer issue. I am not seeing the same as you. I added NRF_LOG_INFO("timeout handler"); inside your timeout handler, and this is what I see in the log:

    Try to unzip it into an unmodified SDK and see if it still occurs after you fix the changes that I mentioned in this post. Also make sure to rebuild the project completely, like I mentioned in the other post.

    Best regards,

    Edvin

  • Hi

    You shouldn't call functions that are defined in main.c from another file.

    Can you please guide how can I call main.c function in this case?(Any reference) 
    Thanks

Reply Children
Related