PreviousNext
runRFPGM
Help > OS functions > RFPGM – wireless upload > runRFPGM

Function

 

Switch to RFPGM mode

Purpose

 

One-shot immediate switching to RFPGM mode

Syntax

 

void runRFPGM()

Parameters

 

  –

Return value

 

  –

Output values

 

RFPGM mode initiated

Preconditions

 

     For non-networking modes and RF bit rate 19.836 kb/s only.

     All user peripherals (UART, Timer6,…) used must have their interrupt enable flags (TXIE, TMR6IE, …) disabled first.

     LP mode must be activated in IQRF IDE when uploaded TR modules use low power RFPGM mode.

Remarks

 

     RF programming uses RF band and RF channel according to TR module configuration.

     RFPGM mode can be refused:

     By low level on dedicated pin (if enabled). See setupRFPGM Parameters.

     By the End RFPGM button in IQRF IDE (unconditionally)

     ~1 minute after entering RFPGM mode (if enabled)

     After runRFPGM finishes, the TR always restarts (regardless to runRFPGM result) and skips optional RFPGM invoked after reset.

     After an unsuccessful RFPGM upload the TR stays in RFPGM mode, see IQRF OS User’s guide, Appendix 3 – RFPGM.

Side effects

 

  –

See also

 

enableRFPGM, setupRFPGM

Example 1

 

void APPLICATION()

...

if (jumperSet)

{

  runRFPGM();       // Enter RFPGM mode on special request

...                 // The application never continues here, regardless on                         // runRFPGM()result.

}

Example 2

 

       // All user peripheral interrupts must be disabled here (if used)
RCIE = 0;    // E.g. UART RX interrupt disable
TMR6IE = 0;  // E.g. Timer 6 interrupt disable

runRFPGM();  // Run on channel(s)according to TR configuration

...                 // The application never continues here, regardless on                         // runRFPGM()result.