💬 MySensors NRF5 Platform
-
@NeverDie said in 💬 MySensors NRF5 Platform:
Is it just me, or does the myBoardNrf5 cause I2c to fail during initialization? I have code which worked fine on mNrf5Board but which now hangs during initialization when using myBoardNrf5. :( Is it working for anyone else?
I've re-installed everything and am still getting no joy using I2C currently. The non-I2C stuff seems to be working fine though.
So, before I spin more cycles trying to figure it out, is i2c working for anyone else right now using the latest builds and myBoardNrf5? Or, is I2C currently broken?It appears that the place where it hangs is this line here in Wire_nRF52.cpp:
while(!_p_twim->EVENTS_LASTTX && !_p_twim->EVENTS_ERROR);This is too bad, as I2C seemed to work fine prior to around a couple weeks ago. I think maybe (?) the latest update somehow broke it.
Please advise.
-
Well, since I'm dead in the water as things stand, I moved the code over to run on an nRF52 DK. Then, usingy Sandeep's code and none of the mysensors code, I was able to get the nRF52 DK to read an attached Si7021 temperature-humidity sensor. i.e. that worked without hanging.
So, it would appear that there's something about the mysensors code that is causing the problems. @d00616 Can we please get it fixed?
-
Well, since I'm dead in the water as things stand, I moved the code over to run on an nRF52 DK. Then, usingy Sandeep's code and none of the mysensors code, I was able to get the nRF52 DK to read an attached Si7021 temperature-humidity sensor. i.e. that worked without hanging.
So, it would appear that there's something about the mysensors code that is causing the problems. @d00616 Can we please get it fixed?
@NeverDie said in 💬 MySensors NRF5 Platform:
So, it would appear that there's something about the mysensors code that is causing the problems. @d00616 Can we please get it fixed?
I have no I2C Hardware for testing, but I take a look into the I2C and MySensors code soon.
-
The sooner the better. I'm pretty much stuck until it gets fixed.
-
@neverdie
I have been using The NRF5 with mysensors for a number of weeks with the si7021.
So it must be just a recent problem with the mysensors code?@rmtucker said in 💬 MySensors NRF5 Platform:
@neverdie
I have been using The NRF5 with mysensors for a number of weeks with the si7021.
So it must be just a recent problem with the mysensors code?I think so. Are you running the most current version? si7021 was working for me too on earlier versions. The latest update seems to have broken it. It's the one that uses myBoardNrf5 instead of myNrf5Board.
-
@neverdie
I have been using The NRF5 with mysensors for a number of weeks with the si7021.
So it must be just a recent problem with the mysensors code?@rmtucker said in 💬 MySensors NRF5 Platform:
@neverdie
I have been using The NRF5 with mysensors for a number of weeks with the si7021.
So it must be just a recent problem with the mysensors code?Would you mind trying the most recent version also to see if it breaks on you too? That would at least confirm it.
Right now my only alternative is to roll-back to the earlier version and just never upgrade again.
-
@rmtucker said in 💬 MySensors NRF5 Platform:
@neverdie
I have been using The NRF5 with mysensors for a number of weeks with the si7021.
So it must be just a recent problem with the mysensors code?Would you mind trying the most recent version also to see if it breaks on you too? That would at least confirm it.
Right now my only alternative is to roll-back to the earlier version and just never upgrade again.
-
@rmtucker said in 💬 MySensors NRF5 Platform:
@neverdie
Where is myBoardNrf5 so i can check? -
@rmtucker said in 💬 MySensors NRF5 Platform:
@neverdie
Where is myBoardNrf5 so i can check? -
Well, in general, it's very handy for handling the pin mappings. Up until the latest release, it has worked fine. It still works fine now, except for the I2C pin mappings.
-
Well, in general, it's very handy for handling the pin mappings. Up until the latest release, it has worked fine. It still works fine now, except for the I2C pin mappings.
-
@neverdie
That explains it i am not using code from d00616.
I am only using the mysensors library and sandeeps stuff.
Sorry mate.@rmtucker said in 💬 MySensors NRF5 Platform:
That explains it i am not using code from d00616.
I am only using the mysensors library and sandeeps stuff.
Sorry mate.If you're using mysensors, then you're using d00616 code :) (i'm kidding)
@NeverDie I can only confirm, it is related to the ArduinoHwNRF5 code as I have not the problem (I'm not using this part yet. I'm still using my own custom board definitions for the moment).
This should be fixed soon (december can be a busy month..) -
@rmtucker said in 💬 MySensors NRF5 Platform:
Where is myBoardNrf5 so i can check?
This is the better repository: https://github.com/mysensors/ArduinoHwNRF5
@neverdie said in 💬 MySensors NRF5 Platform:
@d00616 Maybe you can just make it like it was before, where there was only one pair of I2c pins, not two as in your upgraded version? Maybe then it would work again.
Please give me some time. After an debug session with @scalz and @Yveaux, I think this is a tool chain (GCC 5.3) problem. The pin mapping array is part of the binary, but the Wire constructor gets an array with 0 while the Wire instance has pin mapping information.
Yesterday, I had a try to port ArduinoHwNRF5 back to the same tool chain (GCC 4.8) used by Arduino Primo and SAMD boards. I think for compatibility, this is the best option.
If I have no luck, I either remove the option of the pin remapping table or I go back to the old version. I think going back is no good idea, because the NRF52840 has more than one 32 GPIO, which requires advanced parameters.
-
@rmtucker said in 💬 MySensors NRF5 Platform:
Where is myBoardNrf5 so i can check?
This is the better repository: https://github.com/mysensors/ArduinoHwNRF5
@neverdie said in 💬 MySensors NRF5 Platform:
@d00616 Maybe you can just make it like it was before, where there was only one pair of I2c pins, not two as in your upgraded version? Maybe then it would work again.
Please give me some time. After an debug session with @scalz and @Yveaux, I think this is a tool chain (GCC 5.3) problem. The pin mapping array is part of the binary, but the Wire constructor gets an array with 0 while the Wire instance has pin mapping information.
Yesterday, I had a try to port ArduinoHwNRF5 back to the same tool chain (GCC 4.8) used by Arduino Primo and SAMD boards. I think for compatibility, this is the best option.
If I have no luck, I either remove the option of the pin remapping table or I go back to the old version. I think going back is no good idea, because the NRF52840 has more than one 32 GPIO, which requires advanced parameters.
@d00616 said in 💬 MySensors NRF5 Platform:
Back from the compiler hell. There is no chance getting the GCC 4.8 to work without forking the arduino-nrf5 code. Compiling with GCC 4.8 has the same result.I have changed the templates a little bit and moved the code for pin mapping generation. Now it works for me. Please give me some time to clear the code and create a new package (0.3.0). With the new package, you have to add '#include <compat_pin_mapping.h>' before '#end" in MyBoardNRF5.cpp. You have to rename the '#ifdefs' and '#define' in both board files to match MYBOARDNRF5 instead of MYNRF5BOARD.
-
@d00616 said in 💬 MySensors NRF5 Platform:
Back from the compiler hell. There is no chance getting the GCC 4.8 to work without forking the arduino-nrf5 code. Compiling with GCC 4.8 has the same result.I have changed the templates a little bit and moved the code for pin mapping generation. Now it works for me. Please give me some time to clear the code and create a new package (0.3.0). With the new package, you have to add '#include <compat_pin_mapping.h>' before '#end" in MyBoardNRF5.cpp. You have to rename the '#ifdefs' and '#define' in both board files to match MYBOARDNRF5 instead of MYNRF5BOARD.
@d00616 said in 💬 MySensors NRF5 Platform:
I have changed the templates a little bit and moved the code for pin mapping generation. Now it works for me. Please give me some time to clear the code and create a new package (0.3.0). With the new package, you have to add '#include <compat_pin_mapping.h>' before '#end" in MyBoardNRF5.cpp. You have to rename the '#ifdefs' and '#define' in both board files to match MYBOARDNRF5 instead of MYNRF5BOARD.
Now, there is a new Version 0.3.0 for MyBoardNRF5 available. It can be installed via the Board Manager. Please change the templates like described above. I think, now the board definition is stable and ready to support other Arduino variants without changing the board definition.
-
@d00616 said in 💬 MySensors NRF5 Platform:
I have changed the templates a little bit and moved the code for pin mapping generation. Now it works for me. Please give me some time to clear the code and create a new package (0.3.0). With the new package, you have to add '#include <compat_pin_mapping.h>' before '#end" in MyBoardNRF5.cpp. You have to rename the '#ifdefs' and '#define' in both board files to match MYBOARDNRF5 instead of MYNRF5BOARD.
Now, there is a new Version 0.3.0 for MyBoardNRF5 available. It can be installed via the Board Manager. Please change the templates like described above. I think, now the board definition is stable and ready to support other Arduino variants without changing the board definition.
-
I think I made the changes you recommended, but now I'm getting:
Board MyBoard_nRF51822 (platform nRF5, package MySensors) is unknown Error compiling for board MyBoardNRF5 nRF51822.@neverdie said in 💬 MySensors NRF5 Platform:
I think I made the changes you recommended, but now I'm getting:
Board MyBoard_nRF51822 (platform nRF5, package MySensors) is unknownError compiling for board MyBoardNRF5 nRF51822.
I had the same message. In my case, I have uninstalled arduino-nrf5, cleared files, which are not removed from packages directory (the 0.2.1 MyBoard files) and reinstalled arduino-nrf5. After restarting Arduino it was fine.
-
@neverdie said in 💬 MySensors NRF5 Platform:
I think I made the changes you recommended, but now I'm getting:
Board MyBoard_nRF51822 (platform nRF5, package MySensors) is unknownError compiling for board MyBoardNRF5 nRF51822.
I had the same message. In my case, I have uninstalled arduino-nrf5, cleared files, which are not removed from packages directory (the 0.2.1 MyBoard files) and reinstalled arduino-nrf5. After restarting Arduino it was fine.
@d00616
I'm still getting the error. I tried deleting arduino-nrf5 library and re-installing it fresh, but I don't know how, on Windows, to clear files and remove them from the packages directory. I'm not even aware of their being a "packages directory." Sorry.