GithubHelp home page GithubHelp logo

codal-nrf52's People

Contributors

captaincredible avatar finneyj avatar jamesadevine avatar jimmo avatar johnn333 avatar johnvidler avatar joshuaahill avatar martinwork avatar microbit-carlos avatar mmoskal avatar pelikhan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codal-nrf52's Issues

RoadMap?

Hi,

Is there any roadmap for development of codal-nrf52?

Access Port Protection enabled in newer SoC

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.

Serial baudrate 31250 omitted in NRF52Serial.cpp, MIDI broken on micro:bit v2

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;

Linking error : multiple definition

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.