Search found 25 matches

by plyatov
Fri Feb 06, 2015 4:32 pm
Forum: ChibiStudio
Topic: Error: ChibiOS/RT registry check failed, double linked...
Replies: 8
Views: 2282

Re: Error: ChibiOS/RT registry check failed, double linked..

As I understand, to know StkUnused, I need to count number of 0x55 bytes from "thread->p_stklimit" address?
by plyatov
Fri Feb 06, 2015 11:39 am
Forum: ChibiStudio
Topic: Error: ChibiOS/RT registry check failed, double linked...
Replies: 8
Views: 2282

Re: Error: ChibiOS/RT registry check failed, double linked..

OK.

To improve debugging, I want to print all thread names and their "StkUnused" value from SYSTEM_HALT_HOOK().

Where can I get such information from inside of ChibiOS?
by plyatov
Fri Feb 06, 2015 10:29 am
Forum: ChibiStudio
Topic: Error: ChibiOS/RT registry check failed, double linked...
Replies: 8
Views: 2282

Re: Error: ChibiOS/RT registry check failed, double linked..

Thank you Giovanni!

It was stack overflow. Resolved now.

I wonder - why this stack overflow does not catched by ChibiOS exception?

Previously I successfully resolve many stack overflows when OS reported them from chSysHalt()...
by plyatov
Thu Feb 05, 2015 4:36 pm
Forum: ChibiStudio
Topic: Error: ChibiOS/RT registry check failed, double linked...
Replies: 8
Views: 2282

Error: ChibiOS/RT registry check failed, double linked...

Dear all, after execution of some suspicious code I press "Suspend" button to investigate threads state. I does not observe unhandled exception or system halt hook. In the "ChibiOS/RT 2.x.x Debug View" I'm getting window with "Error: ChibiOS/RT registry check failed, double ...
by plyatov
Fri Aug 22, 2014 11:32 am
Forum: General Support
Topic: ChibiOS restart
Replies: 5
Views: 1503

Re: ChibiOS restart

Issue resolved by usage of special VECTKEY (0x05FA) in bits 31-16 of SCB->AIRCR register.

The "SCB->AIRCR = 0x05fa0000 | SCB_AIRCR_SYSRESETREQ;" does reset of MCU.

Thanks for information!
by plyatov
Fri Aug 22, 2014 11:12 am
Forum: General Support
Topic: ChibiOS restart
Replies: 5
Views: 1503

Re: ChibiOS restart

Map chSysHalt() to your custom port_halt() defined in your fault handler file. Depending on your debugger connection, printout the trace buffer, stackdump and reason for failure. (dbg_panic_msg) Then possibly store what thread caused it to some backup memory to determine if you need a "safe&qu...
by plyatov
Tue Aug 19, 2014 1:35 pm
Forum: General Support
Topic: ChibiOS restart
Replies: 5
Views: 1503

ChibiOS restart

Hello everybody!

Please, advise how to correctly restart ChibiOS.

For safety reasons, my project (based on STM32L152RBT6) need to have posibility of device restart in case of some activated software flag.

Direct call of ResetHandler() does not help and leads to hangup.

Best wishes.
--
Igor
by plyatov
Thu May 08, 2014 12:22 pm
Forum: Development and Feedback
Topic: chprintf and unsigned long long type (uint64_t)
Replies: 4
Views: 1919

chprintf and unsigned long long type (uint64_t)

Dear all, I need uint64_t variables to store time in seconds. It need to be capacious enough to store many years without overflow. Does somebody have patch or idea for chprintf function to support "unsigned long long" type or "uint64_t"? Current implementation of chprintf() in Ch...
by plyatov
Sat Apr 12, 2014 6:47 pm
Forum: General Support
Topic: Threads synchronization by events
Replies: 4
Views: 1391

Re: Threads synchronization by events

Giovanni wrote:It looks OK, you got correctly how mailboxes are supposed to work.

While developing I recommend enabling debug options in chconf.h.

Giovanni


Dear Giovanny, thanks you for support!
by plyatov
Fri Apr 04, 2014 10:42 am
Forum: General Support
Topic: Threads synchronization by events
Replies: 4
Views: 1391

Re: Threads synchronization by events

Dear Giovanni, A question, why not use messages? You may create a message server thread that processes the messages from the other thread. While the server is processing a message the sender is sleeping and continues to sleep until an answer is given (messages are always 2-ways) so mutual exclusion ...

Go to advanced search