RTEMS 6.3
Loading...
Searching...
No Matches
tms570_selftest.c File Reference

This source file contains the selftest support implementation. More...

#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <bsp/tms570.h>
#include <bsp/tms570_selftest.h>
#include <bsp/tms570_hwinit.h>

Macros

#define MSTGCR_ENABLE_MEMORY_SELF_TEST   0x0000010a
#define MSTGCR_DISABLE_MEMORY_SELF_TEST   0x00000105
#define PBIST_RESET_DELAY   (32 * 2)

Functions

bool tms570_efc_stuck_zero (void)
 Checks to see if the EFUSE Stuck at zero test is completed successfully (HCG:efcStuckZeroTest). /.
void tms570_efc_self_test (void)
 EFUSE module self check Driver (HCG:efcSelfTest).
bool tms570_efc_check_self_test (void)
 EFUSE module self check Driver (HCG:checkefcSelfTest).
uint32_t tms570_efc_check (void)
 EFUSE module self check Driver (HCG:efcCheck).
void tms570_pbist_self_check (void)
 PBIST self test Driver (HCG:pbistSelfCheck).
void tms570_pbist_run (uint32_t raminfoL, uint32_t algomask)
 CPU self test Driver (HCG:pbistRun).
void tms570_pbist_stop (void)
 Routine to stop PBIST test enabled (HCG:pbistStop).
bool tms570_pbist_is_test_completed (void)
 Checks to see if the PBIST test is completed (HCG:pbistIsTestCompleted).
bool tms570_pbist_is_test_passed (void)
 Checks to see if the PBIST test is completed successfully (HCG:pbistIsTestPassed).
void tms570_pbist_run_and_check (uint32_t raminfoL, uint32_t algomask)
bool tms570_pbist_port_test_status (uint32_t port)
 Checks to see if the PBIST Port test is completed successfully (HCG:pbistPortTestStatus).
void tms570_pbist_fail (void)
 Reaction to PBIST failure (HCG:pbistFail).
 __attribute__ ((__naked__))
 Memory Initialization Driver (HCG:memoryInit).
void tms570_esm_channel_sr_clear (unsigned grp, unsigned chan)
 Routine to clear specified error channel signalling bit.
int tms570_esm_channel_sr_get (unsigned grp, unsigned chan)
 Routine to test is specified error channel is signalling error.
void tms570_enable_parity (void)
 Enable peripheral RAM parity (HCG:enableParity).
void tms570_disable_parity (void)
 Disable peripheral RAM parity (HCG:disableParity).

Variables

volatile uint32_t *const tms570_esm_group_channel_to_sr_table [4][2]

Detailed Description

This source file contains the selftest support implementation.

Function Documentation

◆ __attribute__()

__attribute__ ( (__naked__) )

Memory Initialization Driver (HCG:memoryInit).

This function is called to perform Memory initialization of selected RAM's.

◆ tms570_disable_parity()

void tms570_disable_parity ( void )

Disable peripheral RAM parity (HCG:disableParity).

This function disables RAM parity for all peripherals for which RAM parity check is enabled. This function is called after memoryInit in the startup

◆ tms570_efc_check()

uint32_t tms570_efc_check ( void )

EFUSE module self check Driver (HCG:efcCheck).

Returns
Returns 0 if no error was detected during autoload and Stuck At Zero Test passed 1 if no error was detected during autoload but Stuck At Zero Test failed 2 if there was a single-bit error detected during autoload 3 if some other error occurred during autoload

This function self checks the EFUSE module.

◆ tms570_efc_check_self_test()

bool tms570_efc_check_self_test ( void )

EFUSE module self check Driver (HCG:checkefcSelfTest).

Returns
Returns TRUE if EFC Selftest was a PASS, else FALSE

This function returns the status of efcSelfTest. Note: This function can be called only after calling efcSelfTest

◆ tms570_efc_self_test()

void tms570_efc_self_test ( void )

EFUSE module self check Driver (HCG:efcSelfTest).

This function self checks the EFSUE module.

◆ tms570_efc_stuck_zero()

bool tms570_efc_stuck_zero ( void )

Checks to see if the EFUSE Stuck at zero test is completed successfully (HCG:efcStuckZeroTest). /.

Returns
1 if EFUSE Stuck at zero test completed, otherwise 0.

Checks to see if the EFUSE Stuck at zero test is completed successfully.

◆ tms570_enable_parity()

void tms570_enable_parity ( void )

Enable peripheral RAM parity (HCG:enableParity).

This function enables RAM parity for all peripherals for which RAM parity check is enabled. This function is called before memoryInit in the startup

◆ tms570_esm_channel_sr_clear()

void tms570_esm_channel_sr_clear ( unsigned grp,
unsigned chan )

Routine to clear specified error channel signalling bit.

Parameters
[in]grp- ESM error channels group
[in]chan- ESM error channel number inside specified group

◆ tms570_esm_channel_sr_get()

int tms570_esm_channel_sr_get ( unsigned grp,
unsigned chan )

Routine to test is specified error channel is signalling error.

tms570_esm_channel_sr_get

Parameters
[in]grp- ESM error channels group
[in]chan- ESM error channel number inside specified group

◆ tms570_pbist_fail()

void tms570_pbist_fail ( void )

Reaction to PBIST failure (HCG:pbistFail).

Returns
Void.

◆ tms570_pbist_is_test_completed()

bool tms570_pbist_is_test_completed ( void )

Checks to see if the PBIST test is completed (HCG:pbistIsTestCompleted).

Returns
1 if PBIST test completed, otherwise 0.

Checks to see if the PBIST test is completed.

◆ tms570_pbist_is_test_passed()

bool tms570_pbist_is_test_passed ( void )

Checks to see if the PBIST test is completed successfully (HCG:pbistIsTestPassed).

Returns
1 if PBIST test passed, otherwise 0.

Checks to see if the PBIST test is completed successfully.

◆ tms570_pbist_port_test_status()

bool tms570_pbist_port_test_status ( uint32_t port)

Checks to see if the PBIST Port test is completed successfully (HCG:pbistPortTestStatus).

Parameters
[in]port- Select the port to get the status.
Returns
1 if PBIST Port test completed successfully, otherwise 0.

Checks to see if the selected PBIST Port test is completed successfully.

◆ tms570_pbist_run()

void tms570_pbist_run ( uint32_t raminfoL,
uint32_t algomask )

CPU self test Driver (HCG:pbistRun).

Parameters
[in]raminfoL- Select the list of RAM to be tested.
[in]algomask- Select the list of Algorithm to be run.

This function performs Memory Built-in Self test using PBIST module.

◆ tms570_pbist_run_and_check()

void tms570_pbist_run_and_check ( uint32_t raminfoL,
uint32_t algomask )

Helper method that will run a pbist test and blocks until it finishes Reduces code duplication in start system start hooks

◆ tms570_pbist_self_check()

void tms570_pbist_self_check ( void )

PBIST self test Driver (HCG:pbistSelfCheck).

This function is called to perform PBIST self test.

◆ tms570_pbist_stop()

void tms570_pbist_stop ( void )

Routine to stop PBIST test enabled (HCG:pbistStop).

This function is called to stop PBIST after test is performed.

Variable Documentation

◆ tms570_esm_group_channel_to_sr_table

volatile uint32_t* const tms570_esm_group_channel_to_sr_table[4][2]
Initial value:
= {
{ NULL, NULL },
{ &TMS570_ESM.SR[ 0 ], &TMS570_ESM.SR4 },
{ &TMS570_ESM.SR[ 1 ], NULL },
{ &TMS570_ESM.SR[ 2 ], NULL },
}