02-22-2010 03:28 PM
Hello, can u help me to configure timer A in single shot mode on a LM3S8962 development board with labview embedded for ARM ? I try to write in memory at 0x4003.0000... and it doesn't work .Thank's
02-22-2010 05:02 PM
The application properties doesn't allow this but you could change to one-shot in block diagram prior any other opperation.
This will determine a single interrupt and then timer stops.
02-23-2010 04:24 AM
Bonjour,
Thank you for the explanation, but I dont understand why I cannot use the VI "ccg mem poke" in order to configure the timer.
In your code, I have to add the preloaded value for the timer ? Can you explain me how I can do that ?
Sorry for all these questions, but it's very difficult to find explanations for all these questions...
It would be fine that NI give us a real documentation for this version of LABVIEW !!!
Bests regards.
Alain.
02-23-2010 01:35 PM
NI guys did well their job (both documentation and implementation)
Also Luminary/TI explained how to configure the timer:
1. Ensure the timer is disabled (the TAEN bit in the GPTMCTL register is cleared) before making
any changes.
2. Write the GPTM Configuration Register (GPTMCFG) with a value of 0x0.
3. Set the TAMR field in the GPTM TimerA Mode Register (GPTMTAMR):
a. Write a value of 0x1 for One-Shot mode.
b. Write a value of 0x2 for Periodic mode.
4. Load the start value into the GPTM TimerA Interval Load Register (GPTMTAILR).
5. If interrupts are required, set the TATOIM bit in the GPTM Interrupt Mask Register (GPTMIMR).
6. Set the TAEN bit in the GPTMCTL register to enable the timer and start counting.
(page 229/Datasheet-LM3S8962.pdf)
Good Luck!
02-24-2010 04:31 AM
Hello,
Thank you for your help. I know "NI guys did well their job", and usually, I like working with LABVIEW ...
I called to NI FrANCE yesterday, just to explain my problem.
In fact, when I try to write in memory at 0x4003000 for example, (timer A adress) (or 0x4003000C, or 0x40030004, ...) with the CCG VI or in C code (both examples you sent me), in simulation mode,it is OK, but in debug mode with my luminary development card LM3S8962, it is impossible to write in memory at this adress.When I look at the code in KEIL VISION, I have an infinite loop in the module "startup.s" - FaultISR.
May be you have the possibility to test this code on such a development card ?
Is there any protection for this memory area? I don't understand the problem.
Thank's for your help.
Best regards.
Alain.
02-24-2010 09:55 AM
Alain,
When you are running your code in debug mode on your board, are you seeing any errors or does the code just not run and write to that memory space?
02-24-2010 11:54 AM
Bonsoir,
For example, I try to run this very simple code...
I have no error message in LABVIEW, but my program never stop !
If I look at the code in KEIL, I find an infinite loop in the "Startup.s".
FaultISR
B FaultISR
Configuration in KEIL:
Target:
LM3S8962
IROM1 start: 0x0 Size: 0x4000
and for the R/W Mem Access:
IRAM1: 0x2000 0000 Size: 0x10 0000
Well, I don't know exactly the importance of these parameters, but if I increase the size of IRAM1 to 0x2500 0000
The result is the same ....
So, I don't understand....
Thank you for your help...
Alain.
02-25-2010 02:29 AM
Alain,
It appears you are trying to access registers from Timer0 without enabling that device. That's why you are getting a "Bus Fault" (unfortunately, uVision IDE shows wrong line in startup.s, but in disassembly the address is correct - default ISR)
Timer0 is enabled in LabVIEW if you are using interrupts (see LM3Sxxxx_Timer0.c in uVision). The configuration is done prior executing anything from the main VI, so you can use safely Peek&Poke in peripheral's registers. (However, I don't know what are you trying, but using Inline C Node is more descreptive than poking numbers to addresses, and at run time is faster).
I attached here a project with two applications (check Manage Interrupts page of each application properties). If you'll run Application Fault you'll see the same behavior as you had already described. (give a hardware reset before running Application Fault first time - unplug the board or press Reset)
02-25-2010 05:19 AM
Bonjour,
Thank you very much. It's OK now!
I didn't think it was necessary to enable interrupts to write in TIMER0 registers ....
I use InLine C Node, and it's working now.
One more time, thank you for your help.
Alain.
02-16-2011 03:06 AM
can u please tell me ho to use inline c for timer A