Hi CmpilerGuru,
I use CW6.2 & PE. The chip is MC9S08QE128. I used banked memory model putting the interrupts to non-banked like this. Because my code size is 90kb.
#ifndef __SMALL__
#pragma CODE_SEG __NEAR_SEG NON_BANKED
#endif
Interrupt void()
#ifndef __SMALL__
#pragma CODE_SEG DEFAULT
#endif
I'm ok with this one. But after all, I found timing is a bit slow.. Because I need the faster timing,
then I created a new project with the small memory model by putting all the function calls to banked area as suggested in this post like this (for example).
/*
* File: mdrv_eeprom.h
*
*/
/*** BeginHeader */
#ifndef __MDRV_EEPROM_H__
#define __MDRV_EEPROM_H__
/*** EndHeader */
#pragma push
#pragma CODE_SEG __FAR_SEG PAGED_ROM
//***** Functions *****
extern void eeprom_read(unsigned char * dest, unsigned long addr, unsigned short len);
extern void eeprom_write(unsigned long addr, unsigned char * src, unsigned short len);
#pragma pop
/*** BeginHeader */
#endif __MDRV_EEPROM_H__
/*** EndHeader */
/*** BeginHeader */
#ifndef __MDRV_EEPROM_C__
#define __MDRV_EEPROM_C__
/*** EndHeader */
#include "mdrv_acu205.h"
/////////////////////////////////////
// Begin of Functions
/////////////////////////////////////
#pragma push
#pragma CODE_SEG __FAR_SEG PAGED_ROM
void eeprom_read(unsigned char * dest, unsigned long addr, unsigned short len)
{
}
void eeprom_write(unsigned long addr, unsigned char * src, unsigned short len)
{
}
#pragma pop
/*** BeginHeader */
#endif __MDRV_EEPROM_C__
/*** EndHeader */
But now I found that in P&E debugging, mcu frequencies changed to different frequencies. What am I wrong? Pls suggest me something. I do appreciate your suggestion.
Looking forwards to your reply.
Regards,