Hi,
I want to evaluate the basic functionality of the RF430FRL152HEVM board by reading the value from ADC conversion. I've downloaded the RF430FRL152H_NFC_Only project from your website and I've added a few lines of code for the ADC read function into the main(). Since the FRAM_CODE memory is quite limited, I've found out the code size reached its maximum very quickly. I have one variable (unsigned int ADC_Value) which is 2 bytes long. But the difference in occupied FRAM_CODE memory when the "ADC_Value = SD14MEM0;" line is commented or uncommented is 146 bytes. This difference depends on the data type of the variable (f.e. for double it's 510 bytes). It's pretty much since the max available code size is up to 1896 bytes.
I've also discovered it is influenced by the __delay_cycles(); function. If this function is unused, the memory consumption is what I would expected - not that high at all (only a few bytes).
So, according those experiments I did, I would be very happy to understand how is this possible. Why does the __delay_cycles() function have so big influence to this? How does it work and what is happening in the background?
I would very appreciate somebodies help. Maybe I am just missing something what is quite clear.
Thank's,
Vojta
unsigned int ADC_Value = 0;
void main()
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog
DS = 1; // ROM variable needs to be initialized here
asm ( " CALL #0x5CDA "); // Call ROM function ( Initialize function pointers)
asm ( " CALL #0x5CAC "); // Call ROM function ( Check part configuration)
initISO15693(CLEAR_BLOCK_LOCKS);
DeviceInit();
SD14CTL0 = SD14EN + VIRTGND;
SD14CTL1 = SD14UNI + SD14INTDLY0;
while(1)
{
SD14CTL0 |= SD14SC;
__delay_cycles(100);
ADC_Value = SD14MEM0;
//__bis_SR_register(LPM3_bits + GIE);
}
(