brazos-trapezoidal
drivers_sim
SRMicro_prv.h
Go to the documentation of this file.
1
6
#ifndef SRMICRO_PRV_H_
7
#define SRMICRO_PRV_H_
8
9
#include "
C_Extensions.h
"
10
#include "uc.h"
11
//#include "SRException.h"
12
//#include "SRFlow.h"
13
//#include "SRClockMonitor.h"
14
//#include "MapRecord.h"
15
16
//=====================================================================================================================
17
//-------------------------------------- PUBLIC (Extern Variables, Constants & Defines) -------------------------------
18
//=====================================================================================================================
19
20
#define SRMICRO__LOWPOWER()
//MapRecord__SetResetPassword();SRPowerMgr__GoSleep();
21
22
#define SRMICRO_EXCEPTION_CONTINUOUS_LOCO() SRClockMonitor__MonitorExtClk(655)
23
//=====================================================================================================================
31
//=====================================================================================================================
32
#define SRMICRO_WATCHDOG ENABLED
33
34
//=====================================================================================================================
66
//=====================================================================================================================
67
#define IWDG_PRESCALER 0
68
69
//=====================================================================================================================
121
//=====================================================================================================================
122
#define IWDG_CLOCK 7
123
124
//=====================================================================================================================
136
//=====================================================================================================================
137
#define HSE_STABILISH_TIME 10000
138
139
//=====================================================================================================================
164
//=====================================================================================================================
165
#define CSS_GENERATES_INTERRUPTION ENABLED
166
167
//=====================================================================================================================
184
//=====================================================================================================================
185
#define SRMICRO_RAM_INIT 0x110
// It defines where the RAM starts
186
#define SRMICRO_RAM_END 0x00003fff
// It defines where the RAM ends
187
#define SRMICRO_RAM_END_RUNTIME 0x00003bcf
// It defines where the RAM ends EXCPET Stack
188
189
190
//=====================================================================================================================
200
//=====================================================================================================================
201
#define SRMICRO_NUM_BYTE_FOR_FLASH_CONTINUOUS_TEST 4
202
203
//=====================================================================================================================
213
//=====================================================================================================================
214
#define SRMICRO_NUM_BYTE_FOR_RAM_CONTINUOUS_TEST 4
215
216
//=====================================================================================================================
235
//=====================================================================================================================
236
//#include "Crc32.h" // Include for the Crc engine header file;
237
//#define CRC__PROCESS(accumulator, data) Crc32__ProcessByte(accumulator, data) // Macro for the one byte process;
238
//#define CRC_DATA_TYPE unsigned long int // Type of the data used for the engine;
239
//#define SRMICRO_CRC_INITIAL CRC_INITIAL // Initial value for the accumulator;
240
241
//#include "SRCrc32.h"
242
//#define CRC__PROCESS(accumulator, data) SRCrc32__ProcessByte(accumulator, data)
243
//#define CRC_DATA_TYPE unsigned long int
244
//#define SRMICRO_CRC_INITIAL ((unsigned long int)(CRC_INITIAL))
245
//#include "SRCrc16.h"
246
#define CRC__PROCESS(accumulator, data) SRFastCRCUpd(accumulator, data)
247
#define CRC_DATA_TYPE unsigned short int
248
#define SRMICRO_CRC_INITIAL ((unsigned short int)(0xFFFF))
249
//=====================================================================================================================
259
//=====================================================================================================================
260
#define SRMICRO_CLASSA_WATCHDOG_CONTROL ENABLED
261
262
//=====================================================================================================================
272
//=====================================================================================================================
273
#define SRMICRO_CLASSA_ISR_CONTROL ENABLED
274
275
//=====================================================================================================================
287
//=====================================================================================================================
288
#define SRMICRO_EXCEPTION_CONTINUOUS_FLASH(calc,expected) SRException__Queue(EXCEPTION_FLASH_ERROR,calc,expected)
289
//=====================================================================================================================
297
//=====================================================================================================================
298
#define SRMICRO_EXCEPTION_CONTINUOUS_RAM(address) SRException__Queue(EXCEPTION_RAM_RUNTIME_CORRUPTION,((unsigned short int)address)/65536,(unsigned short int)address)
299
300
//=====================================================================================================================
308
//=====================================================================================================================
309
#define SRMICRO_EXCEPTION_STACK_OVERFLOW() SRException__Queue(EXCEPTION_STACK_OVERFLOW_ERROR,0,0)
310
311
//=====================================================================================================================
321
//=====================================================================================================================
322
#define SRMICRO_EXCEPTION_STACK_UNDERFLOW() SRException__Queue(EXCEPTION_STACK_UNDERFLOW_ERROR,0,0)
323
324
//=====================================================================================================================
334
//=====================================================================================================================
335
#define SRMICRO_FLOW_LOG_STACK_UNDERFLOW_OVERFLOW() SRFlow__MainLogEvent(STACK_OVERFLOW_TEST_EVENT)
336
337
//=====================================================================================================================
346
//=====================================================================================================================
347
#define SRMICRO_FLOW_LOG_CPU_TEST() SRFlow__MainLogEvent(SRMICRO_MONITOR_CPU_TEST)
348
349
//=====================================================================================================================
359
//=====================================================================================================================
360
#define SRMICRO_FLOW_LOG_RAM_TEST()
//SRFlow__MainLogEvent(SRMICRO_MONITOR_RAM_TEST)
361
362
//=====================================================================================================================
372
//=====================================================================================================================
373
#define SRMICRO_FLOW_LOG_FLASH_TEST() SRFlow__MainLogEvent(SRMICRO_MONITOR_FLASH_TEST)
374
375
//=====================================================================================================================
384
//=====================================================================================================================
385
#define SRMICRO_EXCEPTION_RUNTIME_CPU_REGISTER() SRException__Queue(EXCEPTION_CPU_REGISTER_ERROR,0,0)
386
387
//=====================================================================================================================
397
//=====================================================================================================================
398
extern
void
_iar_program_start(
void
);
399
#define SRMICRO_JUMPAAPLICATION() _iar_program_start();
400
401
//=====================================================================================================================
413
//=====================================================================================================================
414
#define SRMICRO_RAM_BOOT_TEST ENABLED
415
416
//=====================================================================================================================
428
//=====================================================================================================================
429
#define SRMICRO_FLASH_BOOT_TEST ENABLED
430
431
//=====================================================================================================================
439
//=====================================================================================================================
440
#define SRMICRO__WATCHDOG_RESET() Micro_Watchdog_Boottest_Flag = 0xAA; while(1);
441
442
//=====================================================================================================================
452
//=====================================================================================================================
453
#define SRMICRO_FLOW_INITIALIZE() SRFlow__InitLogEvent(SRMICRO_INITIALIZE)
454
455
//=====================================================================================================================
466
//=====================================================================================================================
467
#define SRMICRO_CPU_PERIODIC_TEST ENABLED
468
469
//=====================================================================================================================
480
//=====================================================================================================================
481
#define SRMICRO_RAM_PERIODIC_TEST ENABLED
482
483
//=====================================================================================================================
493
//=====================================================================================================================
494
#define SRMICRO_FLASH_PERIODIC_TEST ENABLED
495
496
//=====================================================================================================================
509
//=====================================================================================================================
510
#define SRMICRO_STACK__UNDERFLOW_OVERFLOW_TEST ENABLED
511
512
//=====================================================================================================================
551
//=====================================================================================================================
552
#define INBUILT_FLASH_CRC_CALCULATOR ENABLED
553
554
//=====================================================================================================================
577
//=====================================================================================================================
578
#define SRMICRO_FLASH_INIT 0xFFFC0004
// It defines where the Flash starts
579
#define SRMICRO_FLASH_END 0xFFFFBF8F
// It defines where the Flash ends
580
#define SRMICRO_CRC_FLASH 0xFFFC0000
// It defines where the CRC will be stored
581
582
//=====================================================================================================================
593
//=====================================================================================================================
594
#define SRMICRO_INITIAL_DELAY 500
595
#define LOCO_INTERRUPT_PRIORITY 3
596
597
#endif
// SRMICRO_PRV_H_
598
599
C_Extensions.h
This file contains the definition of commonly used Macro and Enumerators.
Generated by
1.9.3