Discussion in "ARM Development" started by    hbaocr    May 3, 2008.
Sat May 03 2008, 10:29 am
#1
thank for attension on my problem
i'm using LPC2214 to collect data form ADC chanel control and store it in the ARRAY data by timer interrupt match each 1ms.That means I samples sample per 1 milisecons.And after 50milisecond I genearate all 50 collected data in ARRAY to PC through UART port.but I have problem
that is "Non-aligned Access: Thumb Instruction at 00000674H, Memory Access at 000009EBH"
when run in simulation by Keil C.
And when I load the HEX file of that code into my uc LPC2214 it only output through UART port 2 times and stand by,don't do anything until I reset uC LPC2214.
what can I do to solve that problem
here are code

void IRQ_Match0_timer0(void)__irq;//match0 Timer0;
unsigned int FIR_LPF(unsigned int data_update,int *arraybuffer);

in the function
int buffer_temp_array1[11]={0};
int buffer_temp_array2[11]={0};
int datacollected1[50]={0};
main()
{
setup all information for my application(VIC ,timer,UART)
.......
index=0;
While(1)
{
datacollected1[index]=FIR_LPF(dataonADC1,buffer_temp_array1);
datacollected2[index]=FIR_LPF(dataonADC2,buffer_temp_array2);
//here appear error when I see on ASM code generate of that code on DISSASEMBLY window on keil ""Non-aligned Access: Thumb Instruction at 00000674H, Memory Access at 000009EBH" on LDR instruction??///

}
}
void IRQ_Match0_timer0(void)__irq;//interrupt Timer0 each ones milisecons
{
dataonADC1=readadcchanel(1);
dataonADC2=readadcchanel(2);
index++
if (index>=50)
{index=0;
outUART(datacollected1);//output all of datacollected and filter by LPF digital filter
outUART(datacollected2);
}
}
}
Please show me how I can solve that problem !thank you verry much.


[ Edited Sat May 03 2008, 10:30 am ]
Mon May 05 2008, 01:18 am
#2
try increasing the stack size...


cant comment until we cud see the

FIR_LPF(unsigned int data_update,int *arraybuffer);
definition!

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am