bcm-1278-c18 demo board application note · the bcm-1278-c18 has an operating voltage ranging from...

12
BCM-1278-C18 Demo Board Application Note AN0501E V1.10 1 / 12 February 20, 2019 BCM-1278-C18 Demo Board Application Note D/N: AN0501E Introduction The BCM-1278-C18 RF module developed by Holtek uses OOK/FSK/LoRa ® remote modulation which can provide ultra-long range spread spectrum communication and high interference immunity while at the same time minimising power consumption. It can be used for Sub-1GHz applications in the 433MHz ~ 470MHz license-free ISM bands. The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiver sensitivity of up to -148dBm, a maximum transmission rate of 300kbps in the FSK mode and a low RX current as low as 9.9mA. These features combine make the module suitable for battery, LPWAN and IoT applications that require low power consumption, such as smart home appliance and security systems, intelligent living, industrial, agricultural, animal husbandry, fishery monitoring and other wireless bidirectional communication products requiring wide-area surveillance. This application note will give a description for the basic digital functions of the BCM-1278-C18 module and show how to use its powerful functions in conjunction with the M0+ UI in a specific example. Development Platform The BCE-GENTrx32-001 together with the BCM-1278-C18 are used together to construct the development platform. Here the BCE-GENTrx32-001 is the system development board that uses the HT32F52352 as the master controller while the BCM-1278-C18 is the wireless transceiver module which supports multiple modulation modes. The system development board controls the wireless transceiver module via an SPI communication interface. Figure 1 shows the specified development environment. The HT32F52352 is an Arm ® Cortex ® -M0+ based microcontroller, so users should first install the Keil uVision IDE on their computers. Then use the Holtek e-Link32 Pro, via the JTAG interface, to edit the firmware to the HT32F52352. For more information regarding the HT32F52352, refer to the following website: http://www.holtek.com/productdetail/-/vg/HT32F52342-52

Upload: others

Post on 12-Feb-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 1 / 12 February 20, 2019

BCM-1278-C18 Demo Board Application Note

D/N: AN0501E

Introduction The BCM-1278-C18 RF module developed by Holtek uses OOK/FSK/LoRa® remote

modulation which can provide ultra-long range spread spectrum communication and high

interference immunity while at the same time minimising power consumption. It can be

used for Sub-1GHz applications in the 433MHz ~ 470MHz license-free ISM bands.

The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable

transmitting power of up to +20dBm, a high receiver sensitivity of up to -148dBm, a maximum

transmission rate of 300kbps in the FSK mode and a low RX current as low as 9.9mA. These

features combine make the module suitable for battery, LPWAN and IoT applications that

require low power consumption, such as smart home appliance and security systems,

intelligent living, industrial, agricultural, animal husbandry, fishery monitoring and other

wireless bidirectional communication products requiring wide-area surveillance.

This application note will give a description for the basic digital functions of the

BCM-1278-C18 module and show how to use its powerful functions in conjunction with

the M0+ UI in a specific example.

Development Platform The BCE-GENTrx32-001 together with the BCM-1278-C18 are used together to

construct the development platform. Here the BCE-GENTrx32-001 is the system

development board that uses the HT32F52352 as the master controller while the

BCM-1278-C18 is the wireless transceiver module which supports multiple modulation

modes. The system development board controls the wireless transceiver module via an

SPI communication interface. Figure 1 shows the specified development environment.

The HT32F52352 is an Arm® Cortex®-M0+ based microcontroller, so users should first

install the Keil uVision IDE on their computers. Then use the Holtek e-Link32 Pro, via the

JTAG interface, to edit the firmware to the HT32F52352. For more information regarding

the HT32F52352, refer to the following website:

http://www.holtek.com/productdetail/-/vg/HT32F52342-52

Page 2: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 2 / 12 February 20, 2019

Figure 1. System Architecture

The BCM-1278-C18 is a wireless transceiver module developed by Holtek. The following

table shows its basic parameters.

Item Specifications Remark Operating Voltage 1.8V~3.7V

Operating Current

2.6µA Typ. @3.3V Sleep mode 1.6mA Typ. @3.3V Standby mode 13.7mA Typ. @3.3V FSK RX LNA Boost On 87mA Typ. @3.3V RFOP = +17dBm, on PA_BOOST 120mA Typ. @3.3V RFOP = +20dBm, on PA_BOOST

Frequency Range 405MHz ~ 525MHz Transmitting Power ~ +20 dBm

Receiving Sensitivity -136dBm @Long range LoRa® Mode, highest LNA gain,LNA Boost On, BW=125kHz, SF=10

Modulation Type FSK, GFSK, MSK, GMSK, LoRa®, OOK Transmitting Range 5km @LoRa® Mode Interface 8-pin×2 @2mm Stamp Hole Dimensions 16.2mm(L)×16.2mm(W)×2mm(H)

Note: The bandwidth less than 62.5kHz is not supported.

Table 1. BCM-1278-C18 Basic Parameters

Page 3: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 3 / 12 February 20, 2019

Hardware Architecture The BCE-GENTrx32-001 Ver1.1 development board provides a friendly user operational

interface, including four keys, four LEDs and an LCD module. The board power can be

supplied using three methods for selection. Part of the master controller MCU pins are

pulled out for external use, such as for debugging, other function development controlling,

or as the JTAG programming pins. The actual hardware architecture is illustrated in

Figure 2. Each function is described below.

Figure 2. BCE-GENTrx32-001 Ver1.1 Development Board

1. RF module connectors:Connect to various Holtek RF modules.

2. Indicators: Four LEDs and four Keys,which can be used for indication and input

control during program development. In this application note, the key functions

respectively are: KEY1=Esc, KEY2=Enter, KEY3=Left - function selection move left,

KEY4=Right - function selection move right.

Figure 3. LEDs & KEYs

3. I/O Interface (Header24): Includes part of the HT32F52352 I/O pins and the

BCM-1278-C18 I/O pins, as shown below.

REV.

REV.

REV.

REV.

CSN\PA3

SCLK\PA0

MOSI\PA1

MISO\PA2

DIO0\PC4

PB12

RESET\PA6

PA7

PB0

PB1

PA4

PA5

PB15

PC0\DIO2

PC5\DIO1

PC3\DIO5

PD1

PD2

PC1\DIO3

PC2\DIO4

Figure 4. I/O Interface

Page 4: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 4 / 12 February 20, 2019

4. System power selection: three power sources- from the USB port input, battery

holder or external power (see [12])

5. MCU and BCM-1278-C18 module boards power detection

6. LCD Module: Supports 128×64 dots. The LCD display control program library can be

obtained in the example program code.

7. External power connection interface shown in figure 5. Note that the external voltage

to the system board cannot be higher than 3.6V.

Figure 5. External Power Connection

8. Main Power switch

9. USB or UART communication selection switch

10. System reset key

11. Micro USB interface, can input voltage for system power supply

12. JTAG interface, in conjunction with the IDE interface can be used to emulate and

download programs

BCT Patch Board

In order to directly use the BCM-1278-C18 wireless transceiver module in the

BCE-GENTrx32-001 development platform, a patch board is required to be used as a

bridge between the development platform and the wireless transceiver module.

This patch board, named BCT-GENLR-001, can bridge the BCM-1278-C18 and the

BCM-3701-C01 to the BCE-GENTrx32-001 development platform. The following shows the

pin arrangement and gives a pin description.

Figure 6. BCT-GENLR-001 V1.0 Patch Board

Page 5: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 5 / 12 February 20, 2019

Pin No. Pin Name Type Function Description Connected MCU (HT32F52352) Pin 1 GND — Connect to ground GND 2 GND — Connect to ground GND 3 RESET I/O Reset trigger input PA6 4 DIO0 I/O Digital I/O, software controlled PC4/SPI1_SEL/UR0_TX 5 MISO O SPI data output PA2/SPI1_MISO 6 MOSI I SPI data input PA1/SPI1_MOSI 7 SCLK I SPI clock input PA0//SPI1_SCK 8 CSN I SPI chip select input PA3/SPI1_SEL 9 DIO2 I/O Digital I/O, software controlled PC0/SPI0_SCK/USR1_RX 10 DIO1 I/O Digital I/O, software controlled PC5/SPI1_SCK/UR0_RX 11 DIO5 I/O Digital I/O, software controlled PC3/SPI1_MOSI/UR1_RX 12 DIO4 I/O Digital I/O, software controlled PC2/SPI1_SCK 13 DIO3 I/O Digital I/O, software controlled PC1/SPI1_SEL/UR1_TX 14 VCC — Power supply VCC

Table 2. BCT-GENLR-001 Pins

BCM-1278-C18 Wireless Transceiver Module

The BCM-1278-C18 wireless transceiver module integrates a high performance

transceiver IC and high frequency matching network. It can be easily used through a

digital controlling method and only requires a connection to an antenna. The following

gives a description of the module pins. Users also can directly use the module without a

patch board.

Figure 7. BCM-1278-C18 Module Board

Pin No. Pin Name Type Function Description

1 ANT — RF antenna input 2 GND — Connect to ground 3 DIO3 I/O Digital I/O, software controlled 4 DIO4 I/O Digital I/O, software controlled 5 VDD_RFS — RF power input 6 DIO0 I/O Digital I/O, software controlled 7 DIO1 I/O Digital I/O, software controlled 8 DIO2 I/O Digital I/O, software controlled 9 GND — Connect to ground 10 MISO O SPI data output 11 MOSI I SPI data input 12 SCK I SPI clock input 13 NSS I SPI chip select input 14 NRESET I/O Reset trigger input 15 DIO5 I/O Digital I/O, software controlled 16 GND — Connect to ground

Table 3. BCM-1278-C18 Pins

Page 6: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 6 / 12 February 20, 2019

Demo Code Overview The BCE-GENTrx32-001 development board contains the default demo code which

provides a human-machine interface available for direct wireless transmitting and

receiving operations, allowing the user to quickly understand and use the BCM-1278-C18

functions. The following is a detailed operating description.

Menu Page

After power on, the LCD screen will remain at the menu page which is divided into ten

items as shown below. Users can use the four keys on the development board to control

the transmitter/receiver mode or adjust the parameters.

Figure 8. UI Initial Page

1. Main Item: Contains eight sub-items

2. Mode Option: Select the mode: TX Simple, RX Simple, PER Master and PER Slave

3. Signal Bandwidth: 7.8kHz, 10.4kHz, 15.6kHz, 20.8kHz, 31.2kHz, 41.6kHz, 62.5kHz,

125kHz, 250kHz and 500kHz, a total of 10 options

4. TX Power: +2dBm, +5dBm, +10dBm, +13dBm, +17dBm and +20dBm, a total of 6

options

5. Spreading Factor(SF): 6, 7, 8, 9, 10, 11 and 12, a total of 7 options

6. Ex/Im Pkt: Explicit or Implicit Header Mode. Select Ex mode will keep the Header

while select Im mode will remove the Header

7. PL Length: Select the data packet length to be transmitted. 10 Bytes, 16 Bytes , 24

Bytes, 32 Bytes, 64 Bytes, a total of 5 options

8. Error CrtC: Setup the error Coding Rate - 4/5, 4/6, 4/7 and 4/8, a total of 4 options

9. RF Band: Provides 433MHz and 470MHz, a total of 2 options.

Demo Code Introduction Presently wireless communication can be achieved using multiple technologies. This

demo board has four wireless transmission modes inside which are TX Simple mode, RX

Simple mode, PER Master mode and PER Slave mode. The following will illustrate their

control flowcharts and methods.

Page 7: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 7 / 12 February 20, 2019

TX Simple Mode

The TX Simple mode procedure is divided into three steps. The following will describe the

flowchart and actions of each step.

1. Parameter Initialisation: Resets the wireless module and initialises the digital I/O pins,

selected parameters in the Menu Page are written sequentially into the wireless

module internal registers by the MCU and forces the module to enter standby mode.

2. TX Initialisation: In this step, firstly setup the required IRQ(TxDone), reset the FIFO address

and write data into the FIFO. Then configure the DIO0~DIO5 pins to the recommended

functions. DIO0 → TxDone, DIO1 → RxTimeout, DIO2 → FHSSChangeChannel, DIO3 →

VaidHeader, DIO4 → PllLock, DIO5 → Mode Ready. After completing all the configurations,

enter the TX mode.

3. TX Running: When the data has been transmitted, wait for the IRQ flag (TxDone) to

determine the next step. If the IRQ flag (TxDone) is set, this means that the TX data

has been transmitted successfully and the system will leave the transmitter mode.

Note: after each step, if it is executed for more than 1ms, the key status will be

checked to determine whether to leave the mode.

START

Case = Step1

Case = Step2

Case = Step3

Parameter Initial

TX Initial

TX Running

Case = Step2

Case = Step3

TxDone = 1 Case = Step2

Force Stop

END

Y

Y

Y

Y Y

N

N

N

N

N

Figure 9. TX Simple Flowchart

RX Simple Mode

The RX Simple mode procedure is divided into three steps. The following will describe

the flowchart and actions of each step.

1. Parameter Initialisation: Reset the wireless module and initialise its digital I/O pins,

the selected parameters are written sequentially into the wireless module internal

registers by the MCU and forces the module enter standby mode.

2. RX Initialisation: In this step, firstly setup the required IRQs (RxDone and

PAYLOADCRCERROR). Then configure the DIO0 ~ DIO5 pin to the recommended

functions: DIO0 → RxDone, DIO1 → RxTimeout, DIO2 → FHSSChangeChannel,

DIO3 → CadDone, DIO4 → CadDetected, DIO5 → Mode Ready. After completing all

the configurations, enter the RX mode.

Page 8: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 8 / 12 February 20, 2019

3. Receiving Data: After entering the receiver mode, wait for the IRQ flag (RxDone) to

determine the next step. If the IRQ flag (RxDone) is set, this means that the RX data has

been received successfully and the system will execute Step 2. If the IRQ flag (RxDone)

remains disabled until a RX timeout occurs, the system will also execute Step 2.

Note: After each step, if it is executed for more than 1ms, the key status will be

checked to determine whether to leave the mode.

START

Case = Step1

Case = Step2

Case = Step3

Parameter Initial

RX Initial

RX Running

Case = Step2

Case = Step3

RxDone= 1 Case = Step2

Force Stop

END

Y

Y

Y

Y Y

N

N

N

N

N

Time OutYN

Case = Step2

Figure 10. RX Simple Flowchart

PER Master Mode

The PER Master Mode is used to test whether the transmitted data has been received

correctly. In the PER master mode, the module can enter the receiving operation after

leaving the transmitting operation and then check the received data correctness, to

determine if the communication was successful or not. The following will describe the

flowchart and actions of each section.

1. TX Section: The section from Step1 to Step3 is for transmitting operations, which is

the same as the TX Simple Mode.

2. RX Section: The section from Step4 to next Step1 is the same as the RX Simple

Mode. However here if a waiting timeout (RX Timeout) occurs, in the PER Master

Mode, it will be initialised and enter the TX mode to re-transmit data to avoid a

system halt, while in the RX Simple Mode, it will be forced stop.

Note: after each step, if it is executed for more than 1ms, the key status will be

checked to determine whether to leave the mode.

Page 9: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 9 / 12 February 20, 2019

START

Case = Step1

Case = Step2

Case = Step3

Parameter Initial

TX Initial

TX Running

Case = Step2

Case = Step3

TxDone = 1 Case = Step4

Force Stop

END

Y

Y

Y

Y Y

N

N

N

N

N

Case = Step4

Case = Step5

RX Initial

RX Running

Case = Step5

RxDone= 1 Case = Step2

Y

Y Y

N

N

N

Time OutYN

Case = Step2

Figure 11. PER Master Flowchart

PER Slave Mode

The PER Slave Mode is used to inform the system that the transmitted data has been

received correctly. In the PER Slave mode, the module can enter the transmitting

operation after leaving the receiving operation. The following will describe the flowchart

and actions of each section.

1. RX Section: The section from Step1 to Step3 is the same as the RX Simple Mode

except that in the PER Slave Mode, after the receiving is complete and the data is

correct, the system will directly enter the initial TX mode.

2. TX Section: The section from Step4 to next Step1 is the same as the TX Simple

Mode except that in the PER Slave Mode, after the transmitting is complete, the

system will be initialised to the RX mode and start the next receiving operation from

Step 2.

Note: after each step, if it is executed for more than 1ms, the key status will be

checked to determine whether to leave the mode.

Page 10: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 10 / 12 February 20, 2019

START

Case = Step1

Case = Step2

Case = Step3

Parameter Initial

RX Initial

RX Running

Case = Step2

Case = Step3

RxDone= 1 Case = Step4

Force Stop

END

Y

Y

Y

Y Y

N

N

N

N

N

Time OutYN

Case = Step2

Case = Step4

Case = Step5

TX Initial

TX Running

Case = Step5

TxDone = 1 Case = Step2

Y

Y Y

N

N

N

Figure 12. PER Slave Flowchart

Program Code Source code files.

BCM-1278-C18 Demo M0+.rar

Considerations This Demo Code was written using uVision V5.18 and the BCE-GENTrx32-001 Ver1.1

Demo Board together with the e-Link32 Pro.

Conclusion This document introduced the Holtek BCM-1278-C18 digital functions. Users can contact

the BESTCOMM Company to obtain the simple demo code for program editing.

For more detailed functions regarding the wireless transceiver in the BCM-1278-C18

module, refer to the related documents on the SEMTECH website:

https://www.semtech.com/products/wireless-rf/lora-transceivers/SX1278.

Page 11: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 11 / 12 February 20, 2019

Reference Files 1. Relating to BCE-GENrx32-001:

http://www.holtek.com/productdetail/-/vg/HT32F52342-52

2. Relating to BCM-1278-C18:

https://www.semtech.com/products/wireless-rf/lora-transceivers/SX1278

3. For more information, refer to the Holtek official website http://www.holtek.com

Version and Modify Information Date Author Issue and Revision

2019.1.16 Walers Ho (何信智)

V1.10. 1. Figure 1 update 2. Table 1 update 3. Hardware architecture description update 4. RX simple mode description update 5. Source code files update

2018.6.28 Popo Wu (吳柏穎) Walers Ho (何信智)

V1.00

Page 12: BCM-1278-C18 Demo Board Application Note · The BCM-1278-C18 has an operating voltage ranging from 1.8V to 3.7V, a programmable transmitting power of up to +20dBm, a high receiv er

BCM-1278-C18 Demo Board Application Note

AN0501E V1.10 12 / 12 February 20, 2019

Disclaimer All information, trademarks, logos, graphics, videos, audio clips, links and other items

appearing on this website ('Information') are for reference only and is subject to change at

any time without prior notice and at the discretion of Holtek Semiconductor Inc.

(hereinafter 'Holtek', 'the company', 'us', 'we' or 'our'). Whilst Holtek endeavors to ensure

the accuracy of the Information on this website, no express or implied warranty is given

by Holtek to the accuracy of the Information. Holtek shall bear no responsibility for any

incorrectness or leakage.

Holtek shall not be liable for any damages (including but not limited to computer virus,

system problems or data loss) whatsoever arising in using or in connection with the use of

this website by any party. There may be links in this area, which allow you to visit the

websites of other companies. These websites are not controlled by Holtek. Holtek will

bear no responsibility and no guarantee to whatsoever Information displayed at such sites.

Hyperlinks to other websites are at your own risk.

Limitation of Liability

In no event shall Holtek Limited be liable to any other party for any loss or damage

whatsoever or howsoever caused directly or indirectly in connection with your access to

or use of this website, the content thereon or any goods, materials or services.

Governing Law

The Disclaimer contained in the website shall be governed by and interpreted in

accordance with the laws of the Republic of China. Users will submit to the non-exclusive

jurisdiction of the Republic of China courts.

Update of Disclaimer Holtek reserves the right to update the Disclaimer at any time with or without prior notice,

all changes are effective immediately upon posting to the website.