123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #include "stm32fxx_STUaddressing.h"
- volatile uint32_t testCell_1 __attribute__((at(0x20000600))); //±?D??úZero??,·??ò±àò??áìáê??ú′?3?í?
- volatile uint32_t testCell_2 __attribute__((at(0x20000610)));
- uint8_t STU_AddressingTest(void)
- {
- uint32_t tmpData;
-
- testCell_1 = 0x55555555;
- testCell_2 = 0xAAAAAAAA;
-
- tmpData = testCell_1;
- if( tmpData != 0x55555555 )
- {
- /*err*/
- return(ERROR);
- }
-
- tmpData = testCell_2;
- if( tmpData != 0xAAAAAAAA )
- {
- /*err*/
- return(ERROR);
- }
-
-
- testCell_1 = 0xAAAAAAAA;
- testCell_2 = 0x55555555;
-
- tmpData = testCell_1;
- if( tmpData != 0xAAAAAAAA )
- {
- /*err*/
- return(ERROR);
- }
- tmpData = testCell_2;
- if( tmpData != 0x55555555 )
- {
- /*err*/
- return(ERROR);
- }
-
-
- testCell_1 = 0x55555555;
- testCell_2 = 0xAAAAAAAA;
-
- tmpData = testCell_1;
- if( tmpData != 0x55555555 )
- {
- /*err*/
- return(ERROR);
- }
- tmpData = testCell_2;
- if( tmpData != 0xAAAAAAAA )
- {
- /*err*/
- return(ERROR);
- }
-
- return(SUCCESS);
- }
|