We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi there! I am using the evaluation version (4k) of the C51 compiler with a Cypress CY7C64603 device. I am trying to use the GPIF section of this device using a set of variables stored as: const char xdata WaveDesc[128]={...}; When I store this many constants in xdata the code does not run; there are no errors during compilation, it just doesnt work. I know the values I am using are correct, as I have implemented the initialisation of the GPIF using an un-rolled version and it works correcly ie:- Dest++ = 0x00; Dest++ = 0x00; ... Dest++ = 0x00; rather than the much more compact for(x=0; x<128; x++){ Dest++ = Source++; } where Source is a pointer to a char in WaveDesc and Dest points to the appropriate register. I have also determined that it is definatly to do with the amount of constants in memory, as a piece of code which works without it does not work if the array is defined, even though the code does not use the array. The code and values are produce by the Cypress GPIF tool, so they should be correct (they look OK to me). I have found that any array greater than 16 digits in length will stop it working. Does anybody have any ideas as to what is going wrong? I dont entirly understand the memory structure of this device yet so it could well be somthing simple, but I cant see it! Thanks in advance Richard
Have you examined the generated assembler? Could there be a timing issue here? "I believe code and data share the same physical RAM address's [sic] so there must be no overlap- any clarification on this point would be appreciated)" The 8051 has separate code & data address spaces.