Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in using with Aduino M0 Pro #316

Open
4KARA opened this issue Feb 13, 2020 · 1 comment
Open

Problem in using with Aduino M0 Pro #316

4KARA opened this issue Feb 13, 2020 · 1 comment

Comments

@4KARA
Copy link

4KARA commented Feb 13, 2020

I am facing some problems while using the library with Arduino M0 Pro (ATMEL SAMD21G)

  • Arduino IDE version or Toolchain: 1.8.0 (went back to an older version to be sure that the problem is not because of the new updates)
  • dw1000 Library version: Latest
  • Arduino device: Arduino M0 Pro

I am using Native Port.

When I upload the BasicConnectivity.ino I get this in the output:

Device ID: FFFF - model: 255, version: 15, revision: 15
Unique ID: FF:FF:FF:FF:FF:FF:FF:FF
Network ID & Device Address: PAN: FFFF, Short Address: FFFF
Device mode: Data rate: 6800 kb/s, PRF: 16 MHz, Preamble: 128 symbols (code #4), Channel: #5

This usually means that the connections between the micro controller and the module are bad, but I have checked it several times with a multi-meter and it seems to be fine. I also checked the same dwm1000 with another board (Teensy 3.6) and it works perfectly fine.

I have read that I have to change the _fastSPI and _slowSPI to 12MHz and 1.5MHz respectively, but it did not help in this situation.

I assume it is a software problem because when I upload the BasicSender.ino from the examples, the compiler gives me these warnings:

c:/users/hypos/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

c:/users/hypos/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

c:/users/hypos/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

c:/users/hypos/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

c:/users/hypos/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

And it does not print anything on the Serial monitor. However, when I upload the BasicReceiver.ino and BasicConnectivityTest.ino there are no warnings. I have already shown the output of BasicConnectivityTest.ino, but in BasicReceiver.ino the output is empty (it does not print anything on the Serial monitor)

When I make first upload of any of those example codes, I get this warning:

In file included from C:\Users\hypos\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

                 from C:\Users\hypos\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

                 from C:\Users\hypos\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/sam.h:540,

                 from C:\Users\hypos\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.4\cores\arduino/Arduino.h:48,

                 from C:\Users\hypos\Documents\Arduino\libraries\arduino-dw1000-master\src\DW1000.h:34,

                 from C:\Users\hypos\Documents\Arduino\libraries\arduino-dw1000-master\src\DW1000.cpp:21:

C:\Users\hypos\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

 #define LITTLE_ENDIAN          1

 

In file included from c:\users\hypos\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

                 from c:\users\hypos\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

                 from C:\Users\hypos\Documents\Arduino\libraries\arduino-dw1000-master\src\DW1000.h:31,

                 from C:\Users\hypos\Documents\Arduino\libraries\arduino-dw1000-master\src\DW1000.cpp:21:

c:\users\hypos\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

 #define LITTLE_ENDIAN _LITTLE_ENDIAN

But it disappears on the second try of uploading the codes. If you know the reason of this issue too, please let me know.

I tried to use Programming Port of Arduino M0 Pro, the same weird things happen to it too. The only difference is that I get some things printed out on the Serial monitor.

for BasicReceiver.ino I get this:

Y.����j
DW1000 initialized ...
Committed configuration ...
Device ID: FFFF - model: 255, version: 15, revision: 15
Unique ID: FF:FF:FF:FF:FF:FF:FF:FF
Network ID & Device Address: PAN: FFFF, Short Address: FFFF
Device mode: Data rate: 110 kb/s, PRF: 16 MHz, Preamble: 2048 symbols (code #4), Channel: #5

for BasicSender.ino I get this:

���j
DW1000 initialized ...
Committed configuration ...
Device ID: FFFF - model: 255, version: 15, revision: 15
Unique ID: FF:FF:FF:FF:FF:FF:FF:FF
Network ID & Device Address: PAN: FFFF, Short Address: FFFF
Device mode: Data rate: 110 kb/s, PRF: 16 MHz, Preamble: 2048 symbols (code #4), Channel: #5
Transmitting packet ... #0

For some reason the first line is not doing the right thing, but I do not think it is an issue.

If you know anything that can help, please let me know!

@jsouriadakis
Copy link

@4KARA did you manage to fix the issue with the samd board? If yes please let me know how. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants