Search found 8 matches

by Jessica
Tue Dec 31, 2013 5:12 pm
Forum: STM32 Support
Topic: Write in file
Replies: 2
Views: 2731

Re: Write in file

Djuro wrote:Start screen with -L parameter and you will take all comuninaction in log file ( screenlog.0 ).
Example: screen -L /dev/ttyACM0
man screen - for more information.


Thanks.

Jessi
by Jessica
Tue Dec 31, 2013 1:51 pm
Forum: STM32 Support
Topic: Write in file
Replies: 2
Views: 2731

Write in file

Hi,

I am using the screen on Ubuntu to get a shell to STM32. I was wondering is it possible to write what it displays in the shell to a text file ?
Any suggestion for opening and writing to a file instead of chprintf () ?

Thanks,
Jessi
by Jessica
Tue Dec 31, 2013 1:47 pm
Forum: STM32 Support
Topic: Use chSysLock() to make sleep
Replies: 4
Views: 3512

Re: Use chSysLock() to make sleep

Giovanni wrote:See halPolledDelay() or gptPolledDelay().

For mS-class delays better use chThdSleepMilliseconds().

Giovanni


Thanks.
I need higher resolution than mS so I think halPolledDelay() works for me.

Jessi
by Jessica
Mon Dec 30, 2013 9:16 pm
Forum: STM32 Support
Topic: Use chSysLock() to make sleep
Replies: 4
Views: 3512

Re: Use chSysLock() to make sleep

Hi,

It is possible but the delay would degrade the realtime performance of the system because no preemption could occur during the lock.

BTW, something similar is already present in the GPT driver, see gptPolledDelay().

Giovanni

Hi,

Thanks for your reply,
Is there anyway to implement a high ...
by Jessica
Mon Dec 30, 2013 8:28 pm
Forum: STM32 Support
Topic: Use chSysLock() to make sleep
Replies: 4
Views: 3512

Use chSysLock() to make sleep

What is locked after using chSysLock(); ?

Is it possible to make a user defined sleep using chSysLock() and a timer ? (Suppose the timer is already initialized)

void UDSleep (unsigned int sleepDelay){
TIM_SetCounter(TIM2, 0);
TIM_Cmd(TIM2, ENABLE);
chSysLock();
while (TIM_GetCounter(TIM2 ...
by Jessica
Sun Dec 15, 2013 7:52 am
Forum: STM32 Support
Topic: STM32F4 Discovery function execution time
Replies: 4
Views: 4224

Re: STM32F4 Discovery function execution time

Tectu wrote:
Jessica wrote:Where is the repository?

http://chibios.org/dokuwiki/doku.php?id ... s:download


~ Tectu


Thank you.
by Jessica
Fri Dec 13, 2013 8:40 pm
Forum: STM32 Support
Topic: STM32F4 Discovery function execution time
Replies: 4
Views: 4224

Re: STM32F4 Discovery function execution time

Giovanni wrote:Hi,

CH_FREQUENCY should allow you to convert. The version in the repository has new macros for this. 2.6.2 should be released next week with the new macros.

Giovanni


Thanks for your reply,
I think CH_FREQUENCY is a defined constant. How can I use it?
Where is the repository?
by Jessica
Fri Dec 13, 2013 3:25 pm
Forum: STM32 Support
Topic: STM32F4 Discovery function execution time
Replies: 4
Views: 4224

STM32F4 Discovery function execution time

Hello,

I need to measure the execution time of a function ( function1() ) in milliseconds and print it. I wrote this code but it just gives me the system ticks. I need milliseconds.

systime_t start,stop, final;
start = chTimeNow();
function ();
stop = chTimeNow();
final = stop - start;
chprintf ...