brazos-trapezoidal
Macros | Functions
SRMicro_prv.h File Reference

Contains the private configuration/parameters for the SRMicro GDM for STM8. More...

#include "C_Extensions.h"
#include "uc.h"
Include dependency graph for SRMicro_prv.h:

Go to the source code of this file.

Macros

#define SRMICRO__LOWPOWER()
 
#define SRMICRO_EXCEPTION_CONTINUOUS_LOCO()   SRClockMonitor__MonitorExtClk(655)
 
#define SRMICRO_WATCHDOG   ENABLED
 
  • Defines the Enabling or disabling of the Independent watchdog
More...
 
#define IWDG_PRESCALER   0
 
#define IWDG_CLOCK   7
 
#define HSE_STABILISH_TIME   10000
 
#define CSS_GENERATES_INTERRUPTION   ENABLED
 
#define SRMICRO_RAM_INIT   0x110
 
#define SRMICRO_RAM_END   0x00003fff
 
#define SRMICRO_RAM_END_RUNTIME   0x00003bcf
 
#define SRMICRO_NUM_BYTE_FOR_FLASH_CONTINUOUS_TEST   4
 
#define SRMICRO_NUM_BYTE_FOR_RAM_CONTINUOUS_TEST   4
 
#define CRC__PROCESS(accumulator, data)   SRFastCRCUpd(accumulator, data)
 
#define CRC_DATA_TYPE   unsigned short int
 
#define SRMICRO_CRC_INITIAL   ((unsigned short int)(0xFFFF))
 
#define SRMICRO_CLASSA_WATCHDOG_CONTROL   ENABLED
 
#define SRMICRO_CLASSA_ISR_CONTROL   ENABLED
 
#define SRMICRO_EXCEPTION_CONTINUOUS_FLASH(calc, expected)   SRException__Queue(EXCEPTION_FLASH_ERROR,calc,expected)
 
#define SRMICRO_EXCEPTION_CONTINUOUS_RAM(address)   SRException__Queue(EXCEPTION_RAM_RUNTIME_CORRUPTION,((unsigned short int)address)/65536,(unsigned short int)address)
 
#define SRMICRO_EXCEPTION_STACK_OVERFLOW()   SRException__Queue(EXCEPTION_STACK_OVERFLOW_ERROR,0,0)
 
#define SRMICRO_EXCEPTION_STACK_UNDERFLOW()   SRException__Queue(EXCEPTION_STACK_UNDERFLOW_ERROR,0,0)
 
  • Call-back for Stack underflow exception.
More...
 
#define SRMICRO_FLOW_LOG_STACK_UNDERFLOW_OVERFLOW()   SRFlow__MainLogEvent(STACK_OVERFLOW_TEST_EVENT)
 
  • Call-back for Flow control when the Stack overflow and underflow is tested.
More...
 
#define SRMICRO_FLOW_LOG_CPU_TEST()   SRFlow__MainLogEvent(SRMICRO_MONITOR_CPU_TEST)
 
  • Call-back for Flow control when the CRC registers is tested.
More...
 
#define SRMICRO_FLOW_LOG_RAM_TEST()
 
  • Call-back for Flow control when the RAM is tested.
More...
 
#define SRMICRO_FLOW_LOG_FLASH_TEST()   SRFlow__MainLogEvent(SRMICRO_MONITOR_FLASH_TEST)
 
  • Call-back for Flow control when the FLASH is tested;
More...
 
#define SRMICRO_EXCEPTION_RUNTIME_CPU_REGISTER()   SRException__Queue(EXCEPTION_CPU_REGISTER_ERROR,0,0)
 
  • Call-back for CPU Register Runtime Test Fail.
More...
 
#define SRMICRO_JUMPAAPLICATION()   _iar_program_start();
 
#define SRMICRO_RAM_BOOT_TEST   ENABLED
 
  • Defines the Enabling or disabling of the Ram test at startup.
More...
 
#define SRMICRO_FLASH_BOOT_TEST   ENABLED
 
  • Defines the Enabling or disabling of the flash boot test.
More...
 
#define SRMICRO__WATCHDOG_RESET()   Micro_Watchdog_Boottest_Flag = 0xAA; while(1);
 
#define SRMICRO_FLOW_INITIALIZE()   SRFlow__InitLogEvent(SRMICRO_INITIALIZE)
 
  • Call-back for Flow control when the SRMicro__Initialize() API is called.
More...
 
#define SRMICRO_CPU_PERIODIC_TEST   ENABLED
 
  • Defines the Enabling or disabling of the Cpu in Ram runtime test.
More...
 
#define SRMICRO_RAM_PERIODIC_TEST   ENABLED
 
  • Defines the Enabling or disabling of the Ram periodic(runtime) test.
More...
 
#define SRMICRO_FLASH_PERIODIC_TEST   ENABLED
 
  • Defines the Enabling or disabling of the flash periodic(runtime) test.
More...
 
#define SRMICRO_STACK__UNDERFLOW_OVERFLOW_TEST   ENABLED
 
  • Defines the Enabling or disabling of the Stack Overflow and Underflow Test.
More...
 
#define INBUILT_FLASH_CRC_CALCULATOR   ENABLED
 
  • Configures the CRC calculation engine either Inbuilt CRC engine (IELF tool by the IAR compiler) or external CRC tool.
More...
 
#define SRMICRO_FLASH_INIT   0xFFFC0004
 
#define SRMICRO_FLASH_END   0xFFFFBF8F
 
#define SRMICRO_CRC_FLASH   0xFFFC0000
 
#define SRMICRO_INITIAL_DELAY   500
 
  • Defines the Initial delay for the system to start to execute the continuous mode tests
More...
 
#define LOCO_INTERRUPT_PRIORITY   3
 

Functions

void _iar_program_start (void)
 

Detailed Description

Contains the private configuration/parameters for the SRMicro GDM for STM8.

Definition in file SRMicro_prv.h.

Macro Definition Documentation

◆ CRC__PROCESS

#define CRC__PROCESS (   accumulator,
  data 
)    SRFastCRCUpd(accumulator, data)

Definition at line 246 of file SRMicro_prv.h.

◆ CRC_DATA_TYPE

#define CRC_DATA_TYPE   unsigned short int

Definition at line 247 of file SRMicro_prv.h.

◆ CSS_GENERATES_INTERRUPTION

#define CSS_GENERATES_INTERRUPTION   ENABLED

Definition at line 165 of file SRMicro_prv.h.

◆ HSE_STABILISH_TIME

#define HSE_STABILISH_TIME   10000

Definition at line 137 of file SRMicro_prv.h.

◆ INBUILT_FLASH_CRC_CALCULATOR

#define INBUILT_FLASH_CRC_CALCULATOR   ENABLED

  • Configures the CRC calculation engine either Inbuilt CRC engine (IELF tool by the IAR compiler) or external CRC tool.

  • Boot time Flash Test which goes over all the flash calculating CRC and compares it against a CRC value stored in FLASH memory.

    Inbuilt CRC tool(IELF)-

    1. Used by enabling the INBUILT_FLASH_CRC_CALCULATOR macro.
    2. It uses the crc GDM(CRC16) for CRC calculation.
    3. CRC16_CCITT_FULL macro should be uncommented in the crc_prm.h file in order to use the FLASH CRC check.
    4. It uses the FLASH memory range from the linker file(config.icf).

    External CRC tool-

    1. Disable the INBUILT_FLASH_CRC_CALCULATOR macro.
    2. Define the Flash memory range and the location where the CRC value is stored as below- #define SRMICRO_FLASH_INIT 0xffff0000 // It defines where the Flash starts #define SRMICRO_FLASH_END 0xffffffff // It defines where the Flash ends #define SRMICRO_CRC_FLASH 0xffffC000 // It defines where the CRC will be stored
    3. Defines the engine used for Crc calculation as below For Crc32 #include "Crc32.h" #define CRC__PROCESS(accumulator, data) Crc32__ProcessByte(accumulator, data) #define CRC_DATA_TYPE unsigned long int #define SRMICRO_CRC_INITIAL CRC_INITIAL

      For Crc (Crc 16 bits) #include "Crc.h" #define CRC__PROCESS(accumulator, data) FastCRCUpd(accumulator, data) #define CRC_DATA_TYPE unsigned short int #define SRMICRO_CRC_INITIAL ((unsigned short int)(0x0000))

Parameters
-ENABLED(1) - Which uses the inbuilt CRC engine IELF tool by the IAR compiler DISABLED(0) – User has to configure its own CRC engine
Note
- "#define INBUILT_FLASH_CRC_CALCULATOR ENABLED" "#define INBUILT_FLASH_CRC_CALCULATOR DISABLED"

Definition at line 552 of file SRMicro_prv.h.

◆ IWDG_CLOCK

#define IWDG_CLOCK   7

Definition at line 122 of file SRMicro_prv.h.

◆ IWDG_PRESCALER

#define IWDG_PRESCALER   0

Definition at line 67 of file SRMicro_prv.h.

◆ LOCO_INTERRUPT_PRIORITY

#define LOCO_INTERRUPT_PRIORITY   3

Definition at line 595 of file SRMicro_prv.h.

◆ SRMICRO__LOWPOWER

#define SRMICRO__LOWPOWER ( )

Definition at line 20 of file SRMicro_prv.h.

◆ SRMICRO__WATCHDOG_RESET

#define SRMICRO__WATCHDOG_RESET ( )    Micro_Watchdog_Boottest_Flag = 0xAA; while(1);

Definition at line 440 of file SRMicro_prv.h.

◆ SRMICRO_CLASSA_ISR_CONTROL

#define SRMICRO_CLASSA_ISR_CONTROL   ENABLED

Definition at line 273 of file SRMicro_prv.h.

◆ SRMICRO_CLASSA_WATCHDOG_CONTROL

#define SRMICRO_CLASSA_WATCHDOG_CONTROL   ENABLED

Definition at line 260 of file SRMicro_prv.h.

◆ SRMICRO_CPU_PERIODIC_TEST

#define SRMICRO_CPU_PERIODIC_TEST   ENABLED

  • Defines the Enabling or disabling of the Cpu in Ram runtime test.

  • Normally this configuration should be enabled.
Parameters
-ENABLED(1) - Which Enables the Ram periodic test DISABLED(0) – Which Disables the Ram periodic test
Note
- "#define SRMICRO_CPU_PERIODIC_TEST ENABLED" "#define SRMICRO_CPU_PERIODIC_TEST DISABLED"

Definition at line 467 of file SRMicro_prv.h.

◆ SRMICRO_CRC_FLASH

#define SRMICRO_CRC_FLASH   0xFFFC0000

Definition at line 580 of file SRMicro_prv.h.

◆ SRMICRO_CRC_INITIAL

#define SRMICRO_CRC_INITIAL   ((unsigned short int)(0xFFFF))

Definition at line 248 of file SRMicro_prv.h.

◆ SRMICRO_EXCEPTION_CONTINUOUS_FLASH

#define SRMICRO_EXCEPTION_CONTINUOUS_FLASH (   calc,
  expected 
)    SRException__Queue(EXCEPTION_FLASH_ERROR,calc,expected)

Definition at line 288 of file SRMicro_prv.h.

◆ SRMICRO_EXCEPTION_CONTINUOUS_LOCO

#define SRMICRO_EXCEPTION_CONTINUOUS_LOCO ( )    SRClockMonitor__MonitorExtClk(655)

Definition at line 22 of file SRMicro_prv.h.

◆ SRMICRO_EXCEPTION_CONTINUOUS_RAM

#define SRMICRO_EXCEPTION_CONTINUOUS_RAM (   address)    SRException__Queue(EXCEPTION_RAM_RUNTIME_CORRUPTION,((unsigned short int)address)/65536,(unsigned short int)address)

Definition at line 298 of file SRMicro_prv.h.

◆ SRMICRO_EXCEPTION_RUNTIME_CPU_REGISTER

#define SRMICRO_EXCEPTION_RUNTIME_CPU_REGISTER ( )    SRException__Queue(EXCEPTION_CPU_REGISTER_ERROR,0,0)

  • Call-back for CPU Register Runtime Test Fail.

  • The macros should be defined connecting the exceptions with the error handling module.
Parameters
-User defined application function prototype for handling the CPU Register Runtime Test Fail.
Note
- "#define SRMICRO_EXCEPTION_RUNTIME_CPU_REGISTER() SRException__Queue(CPU_REGISTER_ERROR,0,0)"

Definition at line 385 of file SRMicro_prv.h.

◆ SRMICRO_EXCEPTION_STACK_OVERFLOW

#define SRMICRO_EXCEPTION_STACK_OVERFLOW ( )    SRException__Queue(EXCEPTION_STACK_OVERFLOW_ERROR,0,0)

Definition at line 309 of file SRMicro_prv.h.

◆ SRMICRO_EXCEPTION_STACK_UNDERFLOW

#define SRMICRO_EXCEPTION_STACK_UNDERFLOW ( )    SRException__Queue(EXCEPTION_STACK_UNDERFLOW_ERROR,0,0)

  • Call-back for Stack underflow exception.

  • The macros should be defined connecting the exceptions with the error handling module.
Parameters
-User defined application function prototype for handling the Stack underflow exception.
Note
- "#define SRMICRO_EXCEPTION_STACK_UNDERFLOW() SRException__Queue(STACK_UNDERFLOW_ERROR,0,0)"

Definition at line 322 of file SRMicro_prv.h.

◆ SRMICRO_FLASH_BOOT_TEST

#define SRMICRO_FLASH_BOOT_TEST   ENABLED

  • Defines the Enabling or disabling of the flash boot test.

  • Boot time Flash Test which goes over all the flash calculating CRC and compares it against a CRC value stored in FLASH memory.
Parameters
-ENABLED(1) - Which Enables the flash boot test DISABLED(0) – Which Disables flash boot test
Note
- "#define SRMICRO_FLASH_BOOT_TEST ENABLED" "#define SRMICRO_FLASH_BOOT_TEST DISABLED"

Definition at line 429 of file SRMicro_prv.h.

◆ SRMICRO_FLASH_END

#define SRMICRO_FLASH_END   0xFFFFBF8F

Definition at line 579 of file SRMicro_prv.h.

◆ SRMICRO_FLASH_INIT

#define SRMICRO_FLASH_INIT   0xFFFC0004

Definition at line 578 of file SRMicro_prv.h.

◆ SRMICRO_FLASH_PERIODIC_TEST

#define SRMICRO_FLASH_PERIODIC_TEST   ENABLED

  • Defines the Enabling or disabling of the flash periodic(runtime) test.

  • Run time Flash Test which calculates CRC couple bytes each time and keeps on continuing until it reaches the FLASH memory ends and compare the calculated CRC against a CRC value stored in FLASH memory.
Parameters
-ENABLED(1) - Which Enables the flash periodic (runtime) test DISABLED(0) – Which Disables flash periodic (runtime) test

Definition at line 494 of file SRMicro_prv.h.

◆ SRMICRO_FLOW_INITIALIZE

#define SRMICRO_FLOW_INITIALIZE ( )    SRFlow__InitLogEvent(SRMICRO_INITIALIZE)

  • Call-back for Flow control when the SRMicro__Initialize() API is called.

  • The macros should be defined connecting the macro with the SRFlow modules.
Parameters
-User defined application function prototype to log the Flow control when the SRMicro__Initialize() API is called.
Note
- "#define SRMICRO_FLOW_INITIALIZE() SRFlow__InitLogEvent(SRMICRO_INITIALIZE)"

Definition at line 453 of file SRMicro_prv.h.

◆ SRMICRO_FLOW_LOG_CPU_TEST

#define SRMICRO_FLOW_LOG_CPU_TEST ( )    SRFlow__MainLogEvent(SRMICRO_MONITOR_CPU_TEST)

  • Call-back for Flow control when the CRC registers is tested.

  • The macros should be defined connecting the macro with the SRFlow modules.
Parameters
-User defined application function prototype to log the Flow control when the CPU is tested during the run time.
Note
- "#define SRMICRO_FLOW_LOG_CPU_TEST() SRFlow__MainLogEvent(SRMICRO_MONITOR_CPU_TEST)"

Definition at line 347 of file SRMicro_prv.h.

◆ SRMICRO_FLOW_LOG_FLASH_TEST

#define SRMICRO_FLOW_LOG_FLASH_TEST ( )    SRFlow__MainLogEvent(SRMICRO_MONITOR_FLASH_TEST)

  • Call-back for Flow control when the FLASH is tested;

  • The macros should be defined connecting the macro with the SRFlow modules
Parameters
-User defined application function prototype to log the Flow control when the FLASH is tested during the run time.
Note
- "#define SRMICRO_FLOW_LOG_FLASH_TEST() SRFlow__MainLogEvent(SRMICRO_MONITOR_FLASH_TEST)"

Definition at line 373 of file SRMicro_prv.h.

◆ SRMICRO_FLOW_LOG_RAM_TEST

#define SRMICRO_FLOW_LOG_RAM_TEST ( )

  • Call-back for Flow control when the RAM is tested.

  • The macros should be defined connecting the macro with the SRFlow modules.
Parameters
-User defined application function prototype to log the Flow control when the RAM is tested during the run time.
Note
- "#define SRMICRO_FLOW_LOG_RAM_TEST() SRFlow__MainLogEvent(SRMICRO_MONITOR_RAM_TEST)"

Definition at line 360 of file SRMicro_prv.h.

◆ SRMICRO_FLOW_LOG_STACK_UNDERFLOW_OVERFLOW

#define SRMICRO_FLOW_LOG_STACK_UNDERFLOW_OVERFLOW ( )    SRFlow__MainLogEvent(STACK_OVERFLOW_TEST_EVENT)

  • Call-back for Flow control when the Stack overflow and underflow is tested.

  • The macros should be defined connecting the macro with the SRFlow modules.
Parameters
-User defined application function prototype to log the Flow control when the Stack overflow and underflow is tested during the run time.
Note
- "#define SRMICRO_FLOW_LOG_STACK_UNDERFLOW_OVERFLOW() SRFlow__MainLogEvent(STACK_OVERFLOW_TEST_EVENT)"

Definition at line 335 of file SRMicro_prv.h.

◆ SRMICRO_INITIAL_DELAY

#define SRMICRO_INITIAL_DELAY   500

  • Defines the Initial delay for the system to start to execute the continuous mode tests

  • The directive depends on the call rate of SRMicro__RamTest(), for instance, if defined as 500 and the method is called every 5ms it would cause a delay of 2.5s to start to execute the continuous mode tests.
Parameters
-from 0 to 65535
Note
- #define SRMICRO_INITIAL_DELAY 500 #define SRMICRO_INITIAL_DELAY 700

Definition at line 594 of file SRMicro_prv.h.

◆ SRMICRO_JUMPAAPLICATION

#define SRMICRO_JUMPAAPLICATION ( )    _iar_program_start();

Definition at line 399 of file SRMicro_prv.h.

◆ SRMICRO_NUM_BYTE_FOR_FLASH_CONTINUOUS_TEST

#define SRMICRO_NUM_BYTE_FOR_FLASH_CONTINUOUS_TEST   4

Definition at line 201 of file SRMicro_prv.h.

◆ SRMICRO_NUM_BYTE_FOR_RAM_CONTINUOUS_TEST

#define SRMICRO_NUM_BYTE_FOR_RAM_CONTINUOUS_TEST   4

Definition at line 214 of file SRMicro_prv.h.

◆ SRMICRO_RAM_BOOT_TEST

#define SRMICRO_RAM_BOOT_TEST   ENABLED

  • Defines the Enabling or disabling of the Ram test at startup.

  • MARCH C algorithm is used in order to test the RAM at startup. Normally this configuration should be enabled.
Parameters
-ENABLED(1) - Which Enables the MarchC Ram boot test DISABLED(0) – Which Disables the MarchC Ram boot test
Note
- "#define SRMICRO_RAM_BOOT_TEST ENABLED" "#define SRMICRO_RAM_BOOT_TEST DISABLED"

Definition at line 414 of file SRMicro_prv.h.

◆ SRMICRO_RAM_END

#define SRMICRO_RAM_END   0x00003fff

Definition at line 186 of file SRMicro_prv.h.

◆ SRMICRO_RAM_END_RUNTIME

#define SRMICRO_RAM_END_RUNTIME   0x00003bcf

Definition at line 187 of file SRMicro_prv.h.

◆ SRMICRO_RAM_INIT

#define SRMICRO_RAM_INIT   0x110

Definition at line 185 of file SRMicro_prv.h.

◆ SRMICRO_RAM_PERIODIC_TEST

#define SRMICRO_RAM_PERIODIC_TEST   ENABLED

  • Defines the Enabling or disabling of the Ram periodic(runtime) test.

  • Normally this configuration should be enabled.
Parameters
-ENABLED(1) - Which Enables the Ram periodic test DISABLED(0) – Which Disables the Ram periodic test
Note
- "#define SRMICRO_RAM_PERIODIC_TEST ENABLED" "#define SRMICRO_RAM_PERIODIC_TEST DISABLED"

Definition at line 481 of file SRMicro_prv.h.

◆ SRMICRO_STACK__UNDERFLOW_OVERFLOW_TEST

#define SRMICRO_STACK__UNDERFLOW_OVERFLOW_TEST   ENABLED

  • Defines the Enabling or disabling of the Stack Overflow and Underflow Test.

  • By enabling this it writes the test pattern on the top and bottom of the stack and periodically checks the pattern value. If the test pattern value are unchanged then there is no stack overflow and underflow or if the pattern value is over written then there is stack overflow.
Parameters
-ENABLED(1) - Which Enables the Stack Overflow and Underflow Test DISABLED(0) – Which Disables the Stack Overflow and Underflow Test
Note
- "#define SRMICRO_STACK__UNDERFLOW_OVERFLOW_TEST ENABLED" "#define SRMICRO_STACK__UNDERFLOW_OVERFLOW_TEST DISABLED"

Definition at line 510 of file SRMicro_prv.h.

◆ SRMICRO_WATCHDOG

#define SRMICRO_WATCHDOG   ENABLED

  • Defines the Enabling or disabling of the Independent watchdog

  • This macro should be Enabled for the production code, can be disabled only for debugging purpose
Parameters
-ENABLED(1) - Which Enables the Independent watchdog DISABLED(0) – Which Disables the Independent watchdog

Definition at line 32 of file SRMicro_prv.h.