Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 2 months ago.
Transmitting in FSK mode
I am using this transmitting code in fsk mode
tsx127x transmitter
#include "sx127x_fsk.h" #include "mbed.h" SX127x kom(PTD6, PTD7, PTD5, PTD4, PTA6, PTA7, PTC16, PTC13, PTA14); SX127x_fsk Fsk(kom); Serial pc(USBTX, USBRX); int main() { Fsk.enable(); Fsk.init(); pc.baud(115200); for(unsigned i = 0; i < 8; i++) { kom.tx_buf[i] = 0xf; pc.printf("%x", kom.tx_buf[i]); } Fsk.start_tx(8); while(true) { while(Fsk.service() != SERVICE_TX_DONE); Fsk.start_tx(8); } }
and it doesn't transmit anything. I have checked registers and fifo is empty all the time even though there is data in the buffer. Do you see what is wrong?
Question relating to:
1 Answer
9 years, 2 months ago.
I had to add a small delay on line 22 before the 2nd start_tx(). Just a millisecond or two is needed, but you must transmit slow enough for receiver side to keep up packet processing.