Hi,
The test/ directory in the sources root has examples for most kernel features. In specific you should look to test/testmbox.c and test/testqueues.c.
Fabio Utzig
Search found 359 matches
- Wed Mar 21, 2012 10:04 pm
- Forum: General Support
- Topic: Mailboxes and queues examples?
- Replies: 17
- Views: 12060
- Wed Mar 21, 2012 1:59 pm
- Forum: General Support
- Topic: ICU and timer channel?
- Replies: 53
- Views: 30037
Re: ICU and timer channel?
kgysmits, The peripheral I used is used to measure liquid flow and generates around 100 pulses for each rotation. I didn't know there were encoders with such high precision. In my specific case, I only need to know the current counter value (after converted to litters value). The counter is incremen...
- Wed Mar 21, 2012 2:37 am
- Forum: General Support
- Topic: ICU and timer channel?
- Replies: 53
- Views: 30037
Re: ICU and timer channel?
I did an implementation for a quadrature decoder last year using two standard input pins configured to trigger interrupts (up and down edges). The state machine is so simple that it can be implemented in maybe 10 lines for the complete code. I never used a processor before that has hardware support ...
- Thu Mar 15, 2012 5:21 pm
- Forum: General Support
- Topic: ICU and timer channel?
- Replies: 53
- Views: 30037
Re: ICU and timer channel?
I know what you mean! :) Here goes a patch attached with the proposed modifications. In retrospect I would say that it doesn't look that much better! If we had 4 channels and four nested if's than it would really look a lot better. Anyway, I already tested this modifications and everything works but...
- Thu Mar 15, 2012 4:07 pm
- Forum: Development and Feedback
- Topic: Support for float (%f) in chprintf
- Replies: 25
- Views: 16087
Re: Support for float (%f) in chprintf
Yesterday I tried to debug this. The problem in chprintf is caused by the function va_arg() returning bogus values when working with type double. Seems to be the same problem that happens to Badger. I put the chprintf on the very beginning of main and the problem happens there too (no only in other ...
- Thu Mar 15, 2012 3:17 pm
- Forum: General Support
- Topic: ICU and timer channel?
- Replies: 53
- Views: 30037
Re: ICU and timer channel?
Giovanni, I just reviewed the whole ICU driver with an oscilloscope and everything is right, working with CH1 and CH2 in both LOW and HIGH active modes. So what I suggested before of maybe having to remove the tests for channel in icu_lld_enable and icu_lld_serve_interrupt was wrong. Still I don't l...
- Thu Feb 23, 2012 1:14 am
- Forum: General Support
- Topic: float corrupted when passed into variable argument list
- Replies: 4
- Views: 2685
Re: float corrupted when passed into variable argument list
I found that same thread when searching for float errors on cortex-m3. I didn't solve the problem for me.
- Thu Feb 23, 2012 12:58 am
- Forum: LCD Driver and Graphic Framework
- Topic: LCD Driver - OLD
- Replies: 53
- Views: 34872
Re: LCD Driver
Hey mobyfab, Are you still working on a GUI for your project? Do you pretend to release the sources? I'll also have to write a GUI and have been investigating some available options but they always seem to be too big/complex (and in C++). My idea is to write something in pure C (no C++) and very sim...
- Thu Feb 23, 2012 12:49 am
- Forum: Development and Feedback
- Topic: Support for float (%f) in chprintf
- Replies: 25
- Views: 16087
Re: Support for float (%f) in chprintf
I guess alignment would not cause any problem as long as you use floats only (4 bytes) and these are not promoted to double (8 bytes) internally. Does this make sense to you? Badger, I'm really not entirely sure about the volatile thing but I had a problem with a line like this: chprintf("%f, %...
- Thu Feb 23, 2012 12:25 am
- Forum: Development and Feedback
- Topic: Minimal C library
- Replies: 2
- Views: 2770
Re: Minimal C library
minilib-c is quite nice. The string manipulation functions would be very useful. I guess stdio/stdlib need low-level implementation which is not done yet. For example fopen calls _fopen which is supposed to be implemented in syscalls.c for every architecture but it's not done for arm. I had to imple...