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

Timer and Multirole for PCA20006

Hello, I have implemented the code below for my project based on switching central and peripheral role in S130. The code works fine on the Devkit PCA10028 but on porting it to PCA20006 I noticed some bugs in the final steps.

  • Without line 195 and 271 to 310 everything seems to work well on the Beacon, the LED is toggling in the right frequency. However after some time the frequency seems to roughly double. I cannot solidly quantify this observation.
  • Adding the above lines, the beacon does not switch on any LED at all. Only in debug mode the LEDs are switched on and the timer handler is entered. It seems there is a problem with my timer interrupt handling, but I dont know what.
  • I Am unsure if this code will be capable of handling 120 interacting nodes (well, mostly only up to 20 should be in close proximity)

Does anybody have an idea what could be my problem when porting to PCA20006? I am also grateful for any ideas to improve the code.

edit1: attached file instead of code: Corrected line numbers to reflect recent changes, as I corrected functionality. edit2: For completness I attached to whole (ecplise) project folder. Putting it into /central_and_peripheral/experimental/ should work. The makefile is currently set for PCA20006.

edit2: attached updated code

edit3: final code

Parents
    • Each time with a flash of the LEDs.I could verify that this LED flashing is in fact the LED initialization I do in main. So it seems, that with scanning the beacon reboots at irregular intervals.
    • If I manually reset it from this state the reset frequency initially seems to correlate with the scanning interval (checked by increasing it). However later on the frequency increases s.t. it is practically always flashing.

    Do you know what could be the reason for this? The only thing I found is that I am using Beacon rev. 1.2. with S130 which apparently was a problem one year ago. It would be great if we could solve this strange bug by the end of the week, as that is my deadline for ordering the hardware for the summer school. Thanks in advance Tobias

Reply
    • Each time with a flash of the LEDs.I could verify that this LED flashing is in fact the LED initialization I do in main. So it seems, that with scanning the beacon reboots at irregular intervals.
    • If I manually reset it from this state the reset frequency initially seems to correlate with the scanning interval (checked by increasing it). However later on the frequency increases s.t. it is practically always flashing.

    Do you know what could be the reason for this? The only thing I found is that I am using Beacon rev. 1.2. with S130 which apparently was a problem one year ago. It would be great if we could solve this strange bug by the end of the week, as that is my deadline for ordering the hardware for the summer school. Thanks in advance Tobias

Children
No Data
Related