micrfrx2  2.1.0.0
Macros | Functions
main.c File Reference

MICRF RX 2 Click Example. More...

#include "board.h"
#include "log.h"
#include "micrfrx2.h"

Macros

#define MICRFRX2_PREAMBLE   0x5AA5
 

Functions

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

Detailed Description

MICRF RX 2 Click Example.

Description

This example demonstrates the use of MICRF RX 2 click board by reading and parsing packet messages received from the transmitter.

The demo application is composed of two sections :

Application Init

Initializes the driver and enables the device.

Application Task

Waits for a data ready indication, then reads all packet data, verifies the CRC bytes in a packet, and displays its data as well as the RSSI value on the USB UART.

Note
The OOK TX click board is a compatible transmitter for the MICRF RX 2 click. Here are a few steps for troubleshooting if you are experiencing issues running this example:
  • 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 MICRFRX2_MAN_BIT_LEN_US value accordingly.
Author
Stefan Filipovic

Macro Definition Documentation

◆ MICRFRX2_PREAMBLE

#define MICRFRX2_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()

int main ( void  )