lancaster-university / codal-nrf52 Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi,
Is there any roadmap for development of codal-nrf52?
I think NRFLowLevelTimer.cpp's setBitMode()
has an error. It looks like BitMode32
is using the wrong constant.
According to the NRF52 docs it should be 3. See: https://infocenter.nordicsemi.com/topic/ps_nrf52833/timer.html?cp=4_1_0_5_27_4_11#register.BITMODE
See:
codal-nrf52/source/NRFLowLevelTimer.cpp
Line 232 in 86be5f2
Hi,
Currently, I2S is directly dependent on NeoPixel (in sync_serial branch).
Do you plan to separate from NeoPixel as "NRF52I2S"?
codal-nrf52/source/NRF52Neopixel.cpp
Line 40 in 3362b48
NRF52Pin fails to override Pin::setAnalogPeriodUs due to parameter type difference (int vs unint32_t).
The value is ultimately passed to pwm->setPeriodUs(int)
so perhaps it needs a size check too?
Newer Nordic SoC will enable the AP Protection on every flash, as the current MDK is < 2.9.0.
There are other devices, that would be get protected, whenever they are flashed by a codal-nrf52 firmware based on this repo.
It would be great if the MDK version could be upgraded to the latest version (2.10.0) to avoid this.
31250 baud is required for sending MIDI via a 5pin MIDI din
Although the enums for the makecode blocks allow you to set the baudrate to 31250 for the serial communication, doing so on microbit V2, will result in the baudrate being set to 115200. This breaks MIDI output to hardware devices, and breaks the microsoft/pxt-MIDI extension.
This is seemingly because a case for 31250 is omitted in lines 196 to 205 in the file NRF52Serial.cpp:
switch(baudrate)
{
case 9600 : baud = NRF_UARTE_BAUDRATE_9600; break;
case 38400 : baud = NRF_UARTE_BAUDRATE_38400; break;
case 57600 : baud = NRF_UARTE_BAUDRATE_57600; break;
case 115200 : baud = NRF_UARTE_BAUDRATE_115200; break;
case 230400 : baud = NRF_UARTE_BAUDRATE_230400; break;
case 921600 : baud = NRF_UARTE_BAUDRATE_921600; break;
case 1000000 : baud = NRF_UARTE_BAUDRATE_1000000; break;
}
The SDK for NRF52 does suggest support for 31250 baud:
/** @brief Baudrates supported by UARTE. */
typedef enum
{
NRF_UARTE_BAUDRATE_1200 = UARTE_BAUDRATE_BAUDRATE_Baud1200, ///< 1200 baud.
NRF_UARTE_BAUDRATE_2400 = UARTE_BAUDRATE_BAUDRATE_Baud2400, ///< 2400 baud.
NRF_UARTE_BAUDRATE_4800 = UARTE_BAUDRATE_BAUDRATE_Baud4800, ///< 4800 baud.
NRF_UARTE_BAUDRATE_9600 = UARTE_BAUDRATE_BAUDRATE_Baud9600, ///< 9600 baud.
NRF_UARTE_BAUDRATE_14400 = UARTE_BAUDRATE_BAUDRATE_Baud14400, ///< 14400 baud.
NRF_UARTE_BAUDRATE_19200 = UARTE_BAUDRATE_BAUDRATE_Baud19200, ///< 19200 baud.
NRF_UARTE_BAUDRATE_28800 = UARTE_BAUDRATE_BAUDRATE_Baud28800, ///< 28800 baud.
NRF_UARTE_BAUDRATE_31250 = UARTE_BAUDRATE_BAUDRATE_Baud31250, ///< 31250 baud.
NRF_UARTE_BAUDRATE_38400 = UARTE_BAUDRATE_BAUDRATE_Baud38400, ///< 38400 baud.
NRF_UARTE_BAUDRATE_56000 = UARTE_BAUDRATE_BAUDRATE_Baud56000, ///< 56000 baud.
NRF_UARTE_BAUDRATE_57600 = UARTE_BAUDRATE_BAUDRATE_Baud57600, ///< 57600 baud.
NRF_UARTE_BAUDRATE_76800 = UARTE_BAUDRATE_BAUDRATE_Baud76800, ///< 76800 baud.
NRF_UARTE_BAUDRATE_115200 = UARTE_BAUDRATE_BAUDRATE_Baud115200, ///< 115200 baud.
NRF_UARTE_BAUDRATE_230400 = UARTE_BAUDRATE_BAUDRATE_Baud230400, ///< 230400 baud.
NRF_UARTE_BAUDRATE_250000 = UARTE_BAUDRATE_BAUDRATE_Baud250000, ///< 250000 baud.
NRF_UARTE_BAUDRATE_460800 = UARTE_BAUDRATE_BAUDRATE_Baud460800, ///< 460800 baud.
NRF_UARTE_BAUDRATE_921600 = UARTE_BAUDRATE_BAUDRATE_Baud921600, ///< 921600 baud.
NRF_UARTE_BAUDRATE_1000000 = UARTE_BAUDRATE_BAUDRATE_Baud1M ///< 1000000 baud.
} nrf_uarte_baudrate_t;
Hi,
When building the sync_serial branch, I got the following error:
This problem is due to the definition of IRQHanlder in nrfx_prs.c by setting template/nrfx_config.h and the same IRQHanlder in your sync_serial.cpp.
Modifying nrfx_config.h simply solves the problem. However, since it is located in codal-nrf52, it cannot be managed by nrf52840-dk.
In the CODAL structure, core/nrf52/nrf52840-dk are compiled separately and built by linking each other. After all, when compiling nrf52, nrfx_config.h is included, so the file must be placed in codal-nrf52.
Is there a reason for this design? Or can you please let me know if there is a good solution?
[ 72%] Built target codal-nrf52840-dk
[ 72%] Linking CXX executable NRF52840_DK
libcodal-nrf52.a(nrfx_prs.c.o): In function `SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler':
/src/libraries/codal-nrf52/nrfx/drivers/src/prs/nrfx_prs.c:60: multiple definition of `SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler'
libcodal-nrf52.a(sync_serial.cpp.o):/src/libraries/codal-nrf52/source/sync_serial.cpp:73: first defined here
libcodal-nrf52.a(nrfx_prs.c.o): In function `SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler':
/src/libraries/codal-nrf52/nrfx/drivers/src/prs/nrfx_prs.c:60: multiple definition of `SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler'
libcodal-nrf52.a(sync_serial.cpp.o):/src/libraries/codal-nrf52/source/sync_serial.cpp:35: first defined here
libcodal-nrf52.a(nrfx_prs.c.o): In function `SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler':
/src/libraries/codal-nrf52/nrfx/drivers/src/prs/nrfx_prs.c:60: multiple definition of `SPIM2_SPIS2_SPI2_IRQHandler'
libcodal-nrf52.a(sync_serial.cpp.o):/src/libraries/codal-nrf52/source/sync_serial.cpp:35: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [NRF52840_DK] Error 1
make[1]: *** [CMakeFiles/NRF52840_DK.dir/all] Error 2
make: *** [all] Error 2
In 0f801b9 some code was added which includes CodalDMESG.h
, but I think this should be CodalDmesg.h
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.