also added the a pragma section found in flash.c to all c-files... dunno
if it actually changes something.
#include "rlt.h"
#include "flash.h"
#include "rlt.h"
#include "flash.h"
+#pragma section CODE=IRAM,attr=CODE
void main(void)
{
unsigned char error = 0;
unsigned char global_error = 0;
unsigned int i, baseaddr;
void main(void)
{
unsigned char error = 0;
unsigned char global_error = 0;
unsigned int i, baseaddr;
- unsigned int toflash[] = {0x9b00,
+ unsigned int toflash2[] = {0x9b00,
0xc106,
0x1656,
0xe0fb}; //len = 9
0xc106,
0x1656,
0xe0fb}; //len = 9
+ unsigned int toflash[] = {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}; //len = 9
/* Enable Clock Monitor */
CSCFG_MONCKI = 1;
/* Enable Clock Monitor */
CSCFG_MONCKI = 1;
i++;
if( (i % 0x10) == 0 ) Puts4("\n");
}
i++;
if( (i % 0x10) == 0 ) Puts4("\n");
}
for(; i<9; i++) {
Puts4("\nwrite: ");
error = FLASH_WriteHalfWord(baseaddr + (2*i), toflash[i]);
for(; i<9; i++) {
Puts4("\nwrite: ");
error = FLASH_WriteHalfWord(baseaddr + (2*i), toflash[i]);
- Puts4(error == 1 ? "[sucess] " : "[failed] ");
+ Puts4(error == 1 ? "[sucess] " : "[failed] ");
Puts4("0x");
Puthex4(toflash[i], 4);
Puts4(" @0x");
Puts4("0x");
Puthex4(toflash[i], 4);
Puts4(" @0x");
i++;
if( (i % 0x10) == 0 ) Puts4("\n");
}
i++;
if( (i % 0x10) == 0 ) Puts4("\n");
}
+ Puts4("\n================================================================\n");
+ i = 0;
+ baseaddr = 0xf4000;
+ for(; i<9; i++) {
+ Puts4("\nwrite: ");
+ error = FLASH_WriteHalfWord(baseaddr + (2*i), toflash2[i]);
+ Puts4(error == 1 ? "[sucess] " : "[failed] ");
+ Puts4("0x");
+ Puthex4(toflash2[i], 4);
+ Puts4(" @0x");
+ Puthex4(baseaddr + (2*i), 6);
+ }
+
+ i=0;
+ Puts4("\nCurrent Content of FLASH at 0xf4000 ... 0xf401F:\n");
+ while(i < 0x20)
+ {
+ Puts4("0x"); Puthex4( *(unsigned char *)(0xf4000 + i), 2); Puts4(" ");
+ i++;
+ if( (i % 0x10) == 0 ) Puts4("\n");
+ }
/* Output Ready Meassage */
if( global_error != 0 )
/* Output Ready Meassage */
if( global_error != 0 )
1.00 UMa Initial Version
-----------------------------------------------------------------------------*/
1.00 UMa Initial Version
-----------------------------------------------------------------------------*/
+#pragma section CODE=IRAM,attr=CODE
#define __IO_DEFINE
#include "mb91465k.h"
#define __IO_DEFINE
#include "mb91465k.h"
+#pragma section CODE=IRAM,attr=CODE
void RLT_InitializeTimer(unsigned char channel, unsigned char runmode, unsigned char clockmode, unsigned char triggermode, unsigned char outputmode)
{
unsigned short setvalue = 0x00;
void RLT_InitializeTimer(unsigned char channel, unsigned char runmode, unsigned char clockmode, unsigned char triggermode, unsigned char outputmode)
{
unsigned short setvalue = 0x00;
#endm
.section CODE, code, align=4
.section CODE_START, code, align=4
#endm
.section CODE, code, align=4
.section CODE_START, code, align=4
+#pragma section CODE=IRAM,attr=CODE
;=========================================================================================
;=========================================================================================
+#pragma section CODE=IRAM,attr=CODE
const char ASCII[] = "0123456789ABCDEF";
void InitUart4(void)
const char ASCII[] = "0123456789ABCDEF";
void InitUart4(void)
#include "mb91465k.h"
#include "rlt.h"
#include "mb91465k.h"
#include "rlt.h"
+#pragma section CODE=IRAM,attr=CODE
/*------------------------------------------------------------------------
InitIrqLevels()
/*------------------------------------------------------------------------
InitIrqLevels()