Hello everyone,
I am using nRF51-DK board with ARM Mbed IDE. I am detecting pulses at P0.09(UART Tx Pin) on the oscilloscope only when UART terminal is connected otherwise not. PFB code .
And when I disconnecting from UART terminal , Pulses at P0.09 are stopped. May I know why this is type of working & what should I do to receive pulses at P0.09 even when UART terminal is not connected on the PC.
Secondly, I want to change serial port pin from P0.09 & P0.11 to P0.25 & P0.24 without Hardware flow control. What should I do for that ??.
#include "mbed.h"
#include "Serial.h"
#define NEED_CONSOLE_OUTPUT 0 // Set this if you need debug messages on the console;
// it will have an impact on code-size and power consumption.
#if NEED_CONSOLE_OUTPUT
#define DEBUG(...) { pc.printf(__VA_ARGS__); }
#else
#define DEBUG(...) // nothing
#endif // #if NEED_CONSOLE_OUTPUT
Serial RN42(USBTX,USBRX);
void RN42_init(void);
void RN42_init(void) {
RN42.format(8,SerialBase::None,1);
RN42.baud(9600);
wait(0.25);
}
int main(void) {
wait(1.0f);
RN42_init();
while(1) {
RN42.putc('A');
RN42.printf("Hello World\n\r");
wait(1.0f);
}
}
Hello everyone,
I am using nRF51-DK board with ARM Mbed IDE. I am detecting pulses at P0.09(UART Tx Pin) on the oscilloscope only when UART terminal is connected otherwise not. PFB code .
And when I disconnecting from UART terminal , Pulses at P0.09 are stopped. May I know why this is type of working & what should I do to receive pulses at P0.09 even when UART terminal is not connected on the PC.
Secondly, I want to change serial port pin from P0.09 & P0.11 to P0.25 & P0.24 without Hardware flow control. What should I do for that ??.
#include "mbed.h" #include "Serial.h" #define NEED_CONSOLE_OUTPUT 0 // Set this if you need debug messages on the console; // it will have an impact on code-size and power consumption. #if NEED_CONSOLE_OUTPUT #define DEBUG(...) { pc.printf(__VA_ARGS__); } #else #define DEBUG(...) // nothing #endif // #if NEED_CONSOLE_OUTPUT Serial RN42(USBTX,USBRX); void RN42_init(void); void RN42_init(void) { RN42.format(8,SerialBase::None,1); RN42.baud(9600); wait(0.25); } int main(void) { wait(1.0f); RN42_init(); while(1) { RN42.putc('A'); RN42.printf("Hello World\n\r"); wait(1.0f); } }