Skip to content

Doesn't work on Nordic NRF51 devboards (PCA10028 etc) - fix supplied #4

Description

@raplin

Original Nordic dev boards have somewhat different hw but use same UART TX/RX as the BLE400 board; however they also require RTS/CTS set up. Adding this at the start of main, to existing 'custom serial pin' stuff; additional setup for the PCA boards..


#ifdef YOTTA_CFG_TXPIN
  #ifdef YOTTA_CFG_RXPIN
 
    //Nordic NRF51 devboard (PCA10028) and probably others
    //use p0_08 is CTS, 0_09=RxD, 0_10=RTS, P0_11=TXD
    //The onboard J-Link seems to want RTS/CTS set correctly.
    //We need to deactivate the "display" we don't have one anyway - and assign the gpios correctly
    //or the device will transmit over the JLink UART but not receive.
    //Again - this is only for the Nordic PCA devboards.
    #pragma message("Btlejack firmware for Nordic PCA10028 dev board RTS/CTS pins")
    uBit.display.disable();
    DigitalOut cts(P0_8,0); //must set rts/cts for Nordic board
    DigitalIn  rts(P0_10);
    /// End Nordic PCA devboard

    #pragma message("Btlejack firmware will use custom serial pins")
    uBit.serial.redirect(YOTTA_CFG_TXPIN, YOTTA_CFG_RXPIN);
    
    
  #endif
#endif

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions