Component RealTime_LDD - Code gets “stuck” in init

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Component RealTime_LDD - Code gets “stuck” in init

886 Views
jdjenzano
Contributor I

 

Component RealTime_LDD - I found on a TWR-K70F120M on CW 10.5 PE 10.3 project that the Periodic interrupt source property for FTM0 defaults to FTM_MOD  (Modulo register)  - When this happens (In my case) the code hangs (loops in the init code – does not return) in any init methods - auto at PE_low_level_init(); or where init is manually set. If I change it to FTM0_C0V it seems to work OK. - Also used the information post at - Real Time counter will not start and run using Processor Expert with FRDM-K20D50M board and the same help typical usage example

 

Looked in the K70 Sub-Family Reference Manual and I do not understand what either of these registers have to do with Periodic interrupt source property but it would seem that the value to compare is held in the register. Maybe the register is used just because it was needed to be stored somewhere?  Anyone have an idea why the FTM0_MOD does not work OK? Is picking FTM0_C0V OK? – Both registers seem the same for storing values

 

Tags (2)
0 Kudos
6 Replies

574 Views
Wlodek_D_
Senior Contributor II

Hello,

Thank you for your post, however please consider moving it to the right community place (e.g. Kinetis Microcontrollers ) to get it visible for active members.

For details please see general advice Where to post a Discussion?

Thank you for using Freescale Community.

0 Kudos

574 Views
jdjenzano
Contributor I

Wlodek_D.

OK I moved it, but is seemed to me to be a PE property setting default related question. but I can understand your interpretation and conclusion  - Thank you for your reply

0 Kudos

574 Views
Petr_H
NXP Employee
NXP Employee

Hi,

Are you using some dome project from the CW installaction ? Or something else?

Please provide more details what components are you using and  how they are used? A sample project would be the best.

Best regards

Petr Hradsky

Processor Expert Support Team

0 Kudos

574 Views
jdjenzano
Contributor I

 

Petr Hradsky Thank you for your response – When we are developing with Code warrior and PE we often build simple separate test project - Test_Componets with not much in there so if the code/component that we think we need does not work (Which seems to be always the case) we use the great help typical usage code to try in understand what we do not understand about the functionality of the Component (bean) we are using (and start off simple as possible minimal interrupts and  no RTOS)

 

In the case of the Real Time Counter (RealTime_LDD) we want to use this for our sample rate so that we could adjust how many samples we would take from ADO (Hall effect sensor input) and  FTM 1 (Linear Quadrature Encoder input) and also output them DAC0 and DAC1 outputs so we could look at them on a conventional scope (or what we are doing now is getting AS1 to work so we can output them to a terminal and also use Freemaster)

 

So the problems we saw with the using the RealTime_LDD component are: 

 

This thread - We could not get it to work with using the default FTM0_MOD it did work with FTM0_C0V

 

AND - In addition as we were testing we saw that the sample rate we would expect with the property setting of Resolution 1 usec  Resolution 1 us – (actual shows – 1.001 us) – This would not put out correct timing (1 usec) on our production code. To get correct timing (as verified by DAC1 output an scope comparing traces of Un-sampled signal (DC to 1K Hz) input ADC0 output DAC0 with sampled input  ADC0 output to DAC1) needed to use -Resolution 100 us – (actual shows – 99.993 us)

 

Attached are the properties listing that we are using and the Help example code that worked in our initial testing (here for convenience.)

 

0 Kudos

574 Views
Petr_H
NXP Employee
NXP Employee

I'm sorry but I still don't understand what do you want to achieve and why are you using Realtime_LDD.

Is period sampling of signal with ADC that you need ?

Please send us the ProcessorExpert.pe file that contains the settings of the component and we can look at it in Processor Expert...

Best regards

Petr Hradsky

Processor Expert Support Team

0 Kudos

574 Views
jdjenzano
Contributor I

Petr Hradsky

Thank you for your rapid response. We used the Real time counter because it seemed like a more generic approach than previous methods and could be applied to other projects that we are updating from S08=>Kinetis/ CW 6.X=>CW 10.5. The Real time Counter seems to work OK if we use FTM0_C0V not FTM0_MOD and 100us not 1 us in our testing. We have the data being accumulated that we need so we are currently moving forward to other requirements. We are focusing on data I/O AS1/Freemaster/PEG – TWR-SER/TWR-LCD-RGB - Our AS1 seems you be working OK- We get data out to the terminal, do not yet understand how to use the FreeMaster Component - and almost everything about TWR-LCD-RGB is a mystery (all of the Examples seem to be IAR - I have the PEG/IAR session at FTF 2014 - FTF-SDS-F0072 scheduled so maybe that will help with that mystery – We did  flash a .out file and verify  that  the hardware works OK)


We will return to re-address the Components we are using when we get through first pass of the prototyping hardware basic functionality we need shortly after FTF 2014

Attached is the DEV template file for the RT1 that works for us

0 Kudos