💬 MySensors NRF5 Platform
-
@d00616 said in 💬 MySensors NRF5 Platform:
I2C should be fixed now. Version 0.4.0 is released!
To help clarify for others who are reading this: the Arduino IDE board manager let me upgrade to 0.4.0 from 0.3.0 by just clicking on the board entry "Nordic Semiconductor NRF5 Boards by Sandeep Mistry", selecting the 0.4.0 version, and then clicking Install.
-
- I have updated the radio driver with fixes for some hardware errata.
- I have updated the https://github.com/mysensors/ArduinoHwNRF5 with an enhanced definition format. File name and contents are changed! The board description is compatible with the NRF5 variant provided by Arduino, but it's not possible to use this variant at the moment.
-
- I have updated the radio driver with fixes for some hardware errata.
- I have updated the https://github.com/mysensors/ArduinoHwNRF5 with an enhanced definition format. File name and contents are changed! The board description is compatible with the NRF5 variant provided by Arduino, but it's not possible to use this variant at the moment.
@d00616 said in 💬 MySensors NRF5 Platform:
I have updated the radio driver with fixes for some hardware errata.
Where do we find the update? i.e. is it baked into the regular MySensors development code thread, or is it elsewhere?
-
I'm guessing it's this one? https://github.com/mysensors/ArduinoHwNRF5
-
I'm guessing it's this one? https://github.com/mysensors/ArduinoHwNRF5
I refreshed all the libraries. I'm able to compile and upload my sketches, but now it complains a lot about "invalid libraries."
WARNING: Spurious .ci folder in 'MySensors' library WARNING: Spurious .mystools folder in 'MySensors' library Sketch uses 3836 bytes (0%) of program storage space. Maximum is 524288 bytes. Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html debug_level: 0 0 adapter speed: 10000 kHz cortex_m reset_config sysresetreq nrf52.cpu: target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x000006e8 msp: 0x20010000 ** Programming Started ** auto erase enabled wrote 4096 bytes from file C:\Users\David\AppData\Local\Temp\arduino_build_255419/Interrupt_button_test_v005.ino.hex in 0.800001s (5.000 KiB/s) ** Programming Finished ** ** Verify Started ** verified 3964 bytes in 0.060000s (64.518 KiB/s) ** Verified OK ** ** Resetting Target ** shutdown command invoked Invalid library found in C:\Users\David\Documents\Arduino\libraries\arduino-nRF5: C:\Users\David\Documents\Arduino\libraries\arduino-nRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5: C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\arduino-nRF5: C:\Users\David\Documents\Arduino\libraries\arduino-nRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5: C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5 -
I refreshed all the libraries. I'm able to compile and upload my sketches, but now it complains a lot about "invalid libraries."
WARNING: Spurious .ci folder in 'MySensors' library WARNING: Spurious .mystools folder in 'MySensors' library Sketch uses 3836 bytes (0%) of program storage space. Maximum is 524288 bytes. Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html debug_level: 0 0 adapter speed: 10000 kHz cortex_m reset_config sysresetreq nrf52.cpu: target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x000006e8 msp: 0x20010000 ** Programming Started ** auto erase enabled wrote 4096 bytes from file C:\Users\David\AppData\Local\Temp\arduino_build_255419/Interrupt_button_test_v005.ino.hex in 0.800001s (5.000 KiB/s) ** Programming Finished ** ** Verify Started ** verified 3964 bytes in 0.060000s (64.518 KiB/s) ** Verified OK ** ** Resetting Target ** shutdown command invoked Invalid library found in C:\Users\David\Documents\Arduino\libraries\arduino-nRF5: C:\Users\David\Documents\Arduino\libraries\arduino-nRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5: C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\arduino-nRF5: C:\Users\David\Documents\Arduino\libraries\arduino-nRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5: C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5@NeverDie said in 💬 MySensors NRF5 Platform:
I refreshed all the libraries. I'm able to compile and upload my sketches, but now it complains a lot about "invalid libraries."
At the moment, I cannot reproduce this with Linux and Arduino 1.8.2. I try to find out what's wrong.
-
@NeverDie said in 💬 MySensors NRF5 Platform:
I refreshed all the libraries. I'm able to compile and upload my sketches, but now it complains a lot about "invalid libraries."
At the moment, I cannot reproduce this with Linux and Arduino 1.8.2. I try to find out what's wrong.
@d00616 said in 💬 MySensors NRF5 Platform:
@NeverDie said in 💬 MySensors NRF5 Platform:
I refreshed all the libraries. I'm able to compile and upload my sketches, but now it complains a lot about "invalid libraries."
At the moment, I cannot reproduce this with Linux and Arduino 1.8.2. I try to find out what's wrong.
Can you try to remove the .ci and .mystools folders?
-
@d00616 said in 💬 MySensors NRF5 Platform:
@NeverDie said in 💬 MySensors NRF5 Platform:
I refreshed all the libraries. I'm able to compile and upload my sketches, but now it complains a lot about "invalid libraries."
At the moment, I cannot reproduce this with Linux and Arduino 1.8.2. I try to find out what's wrong.
Can you try to remove the .ci and .mystools folders?
@d00616 said in 💬 MySensors NRF5 Platform:
Can you try to remove the .ci and .mystools folders?
Done. So, here it is now:
Archiving built core (caching) in: C:\Users\David\AppData\Local\Temp\arduino_cache_16539\core\core_MySensors_nRF5_MyBoard_nRF52832_bootcode_none,lfclk_lfxo,reset_notenable_2d457965a40837233e636c052c58b359.a Sketch uses 3872 bytes (0%) of program storage space. Maximum is 524288 bytes. Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html debug_level: 0 0 adapter speed: 10000 kHz cortex_m reset_config sysresetreq nrf52.cpu: target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000070c msp: 0x20010000 ** Programming Started ** auto erase enabled wrote 4096 bytes from file C:\Users\David\AppData\Local\Temp\arduino_build_610023/Interrupt_button_test_v006.ino.hex in 0.800001s (5.000 KiB/s) ** Programming Finished ** ** Verify Started ** verified 4000 bytes in 0.060000s (65.104 KiB/s) ** Verified OK ** ** Resetting Target ** shutdown command invoked Invalid library found in C:\Users\David\Documents\Arduino\libraries\arduino-nRF5: C:\Users\David\Documents\Arduino\libraries\arduino-nRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5: C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\arduino-nRF5: C:\Users\David\Documents\Arduino\libraries\arduino-nRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5: C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5BTW, I'm using the Windows version of Arduino IDE 1.8.5, which is the most current.
-
@d00616 said in 💬 MySensors NRF5 Platform:
Can you try to remove the .ci and .mystools folders?
Done. So, here it is now:
Archiving built core (caching) in: C:\Users\David\AppData\Local\Temp\arduino_cache_16539\core\core_MySensors_nRF5_MyBoard_nRF52832_bootcode_none,lfclk_lfxo,reset_notenable_2d457965a40837233e636c052c58b359.a Sketch uses 3872 bytes (0%) of program storage space. Maximum is 524288 bytes. Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html debug_level: 0 0 adapter speed: 10000 kHz cortex_m reset_config sysresetreq nrf52.cpu: target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000070c msp: 0x20010000 ** Programming Started ** auto erase enabled wrote 4096 bytes from file C:\Users\David\AppData\Local\Temp\arduino_build_610023/Interrupt_button_test_v006.ino.hex in 0.800001s (5.000 KiB/s) ** Programming Finished ** ** Verify Started ** verified 4000 bytes in 0.060000s (65.104 KiB/s) ** Verified OK ** ** Resetting Target ** shutdown command invoked Invalid library found in C:\Users\David\Documents\Arduino\libraries\arduino-nRF5: C:\Users\David\Documents\Arduino\libraries\arduino-nRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5: C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\arduino-nRF5: C:\Users\David\Documents\Arduino\libraries\arduino-nRF5 Invalid library found in C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5: C:\Users\David\Documents\Arduino\libraries\ArduinoHwNRF5BTW, I'm using the Windows version of Arduino IDE 1.8.5, which is the most current.
@NeverDie said in 💬 MySensors NRF5 Platform:
BTW, I'm using the Windows version of Arduino IDE 1.8.5, which is the most current.
I don't know the correct path on an Windows system. On my system the Sketches are in the ~/Arduino folder in my home directory (~). The arduino-nrf5 is in ~/.arduino15/packages/sandeepmistry/hardware/nRF5/0.4.0 and the ArduinoHwNRF5 files are in ~/.arduino15/packages/MySensors/hardware/nRF5/0.2.1
-
on my Windows machine, all boards are located in c:\Users<username>\AppData\Local\Arduino15\packages
Strange that they've been installed to C:\Users\David\Documents\Arduino\libraries\ on your machine.Maybe just delete the folders and re-install using the board manager?
-
on my Windows machine, all boards are located in c:\Users<username>\AppData\Local\Arduino15\packages
Strange that they've been installed to C:\Users\David\Documents\Arduino\libraries\ on your machine.Maybe just delete the folders and re-install using the board manager?
@mfalkvidd All I know is that if I put a library in the folder: C:\Users\David\Documents\Arduino\libraries
it always gets detected and used. It also means you can completely uninstall/re-install the arduino IDE, and nothing gets lost. I'm not sure about other locations.Am I the only one doing it this way?
-
@mfalkvidd All I know is that if I put a library in the folder: C:\Users\David\Documents\Arduino\libraries
it always gets detected and used. It also means you can completely uninstall/re-install the arduino IDE, and nothing gets lost. I'm not sure about other locations.Am I the only one doing it this way?
-
I use the board manager to manage the boards. I believe it connects directly into github.
Anyhow, I stripped out all the non-library stuff, and now Windows IDE works without complaining.
-
Has anyone here yet figured out how to have more than one type of interrupt at a time wake-up the MCU from sleep? Based on the examples so far, it seems as though only one type at a time can be active. I'm sure there must be some way to do it. For instance, it would be desirable if the MCU could wake up not just from a timer event every, say, 5 minutes, to take a temperature reading, but also immediately if there is a leak detected. Right now it's just one or the other.
-
Has anyone here yet figured out how to have more than one type of interrupt at a time wake-up the MCU from sleep? Based on the examples so far, it seems as though only one type at a time can be active. I'm sure there must be some way to do it. For instance, it would be desirable if the MCU could wake up not just from a timer event every, say, 5 minutes, to take a temperature reading, but also immediately if there is a leak detected. Right now it's just one or the other.
-
I believe hwSleep(..) is the preferred incantation, but beyond that I'm not sure of anything. Maybe @d00616 can comment?
I should be receiving a number of different PCB projects tomorrow for final assembly and test, and if I can't resolve this soon, I'm simply going to release them without full demo code.
-
I believe hwSleep(..) is the preferred incantation, but beyond that I'm not sure of anything. Maybe @d00616 can comment?
I should be receiving a number of different PCB projects tomorrow for final assembly and test, and if I can't resolve this soon, I'm simply going to release them without full demo code.
@NeverDie said in 💬 MySensors NRF5 Platform:
I believe hwSleep(..) is the preferred incantation, but beyond that I'm not sure of anything.
In MySensors, the regular way to use sleep mode is by using the sleep() functions:
https://www.mysensors.org/download/sensor_api_20#sleepingBut like you said, you can also use the raw hwSleep() from the hw abstraction layer. Or you could also rewrite it!
Which means at each abstraction layer, there are additional logics. sleep() functions have more logics (regarding MySensors states and features) than the raw hwSleep for example (like testing if there is an ongoing ota, smartsleep, heartbeat etc..). I have nodes where i use raw or not, but it's good to know what's behind. -
@NeverDie said in 💬 MySensors NRF5 Platform:
I believe hwSleep(..) is the preferred incantation, but beyond that I'm not sure of anything.
In MySensors, the regular way to use sleep mode is by using the sleep() functions:
https://www.mysensors.org/download/sensor_api_20#sleepingBut like you said, you can also use the raw hwSleep() from the hw abstraction layer. Or you could also rewrite it!
Which means at each abstraction layer, there are additional logics. sleep() functions have more logics (regarding MySensors states and features) than the raw hwSleep for example (like testing if there is an ongoing ota, smartsleep, heartbeat etc..). I have nodes where i use raw or not, but it's good to know what's behind. -
I'll try it, but I have strong doubts that it's going to work.
FWIW, here's the pin mapping currently being supplied by digitalPinToInterrupt(..) for the nRF5:
Digital pin 0 = interrupt pin 0
Digital pin 1 = interrupt pin 1
Digital pin 2 = interrupt pin 2
Digital pin 3 = interrupt pin 3
Digital pin 4 = interrupt pin 4
Digital pin 5 = interrupt pin 5
Digital pin 6 = interrupt pin 6
Digital pin 7 = interrupt pin 7
Digital pin 8 = interrupt pin 8
Digital pin 9 = interrupt pin 9
Digital pin 10 = interrupt pin 10
Digital pin 11 = interrupt pin 11
Digital pin 12 = interrupt pin 12
Digital pin 13 = interrupt pin 13
Digital pin 14 = interrupt pin 14
Digital pin 15 = interrupt pin 15
Digital pin 16 = interrupt pin 16
Digital pin 17 = interrupt pin 17
Digital pin 18 = interrupt pin 18
Digital pin 19 = interrupt pin 19
Digital pin 20 = interrupt pin 20
Digital pin 21 = interrupt pin 21
Digital pin 22 = interrupt pin 22
Digital pin 23 = interrupt pin 23
Digital pin 24 = interrupt pin 24
Digital pin 25 = interrupt pin 25
Digital pin 26 = interrupt pin 26
Digital pin 27 = interrupt pin 27
Digital pin 28 = interrupt pin 28
Digital pin 29 = interrupt pin 29
Digital pin 30 = interrupt pin 30 -
The last I heard, from @d00616 , we had to supply code such as:
// Enable interrupt NVIC_SetPriority(RTC0_IRQn, 15); NVIC_ClearPendingIRQ(RTC0_IRQn); NVIC_EnableIRQ(RTC0_IRQn);and
// This must be in one line extern "C" { void RTC0_IRQHandler(void) {rtcInterruptCounter++; NRF5_RESET_EVENT(NRF_RTC0->EVENTS_OVRFLW); NRF_RTC0->EVENTS_OVRFLW=0; }}to get interrupts to work. Even with that approach, though, I haven't gotten it to support any interrupts in addition to a timed sleeping, though I have gotten it to support one interrupt that's separate from a timed sleeping (basically, sleeps indefinitely until the interrupt happens).