micrftx  2.1.0.0
Macros | Functions
main.c File Reference

MICRF TX Click Example. More...

#include "board.h"
#include "log.h"
#include "micrftx.h"

Macros

#define MICRFTX_PREAMBLE   0x5AA5
 
#define MICRFTX_MESSAGE   "MIKROE"
 

Functions

void application_init (void)
 
void application_task (void)
 
void main (void)
 

Detailed Description

MICRF TX Click Example.

Description

This example demonstrates the use of MICRF TX click board by sending a predefined message to the receiver.

The demo application is composed of two sections :

Application Init

Initializes the driver and logger.

Application Task

Sends a predefined message every 3 seconds and displays it on the USB UART.

Note
The MICRF RX click board is a compatible receiver for the MICRF TX click. Here are a few steps for troubleshooting if you are experiencing issues running this example:
  • Make sure the MICRF TX click is set to ASK mode with on-board jumpers.
  • Check the MCU clock configuration, use an external oscillator instead of the MCU's internal one for better accuracy on manchester data rate delay.
  • Measure the actual data rate on the data line and adjust the MICRFTX_MAN_BIT_LEN_US value accordingly.
Author
Stefan Filipovic

Macro Definition Documentation

◆ MICRFTX_MESSAGE

#define MICRFTX_MESSAGE   "MIKROE"

Text message to send.

◆ MICRFTX_PREAMBLE

#define MICRFTX_PREAMBLE   0x5AA5

Packet preamble word.

Function Documentation

◆ application_init()

void application_init ( void  )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void  )

◆ main()

void main ( void  )