Search found 23 matches

by andyturk
Tue Apr 08, 2014 10:33 pm
Forum: General Support
Topic: Need help implementing a Serial Driver
Replies: 2
Views: 2697

Re: Need help implementing a Serial Driver

Thanks, I did take a look at the LPC drivers. The implementation seems strange though, because the "preload" routine always tries to send 16 characters into the TX fifo, without ever looking to see if it's full. I'm sure it works, but it's fairly different than what TI's implementation will need (I ...
by andyturk
Tue Apr 08, 2014 5:39 pm
Forum: General Support
Topic: Need help implementing a Serial Driver
Replies: 2
Views: 2697

Need help implementing a Serial Driver

I'm having a problem getting the output side of my UART serial driver implementation to work. All the characters written eventually make it to the UART, but the annoying part is that a "chunk" of output won't be sent until there's more output. A small example will demonstrate:


int main(void ...
by andyturk
Fri Jan 31, 2014 9:57 pm
Forum: General Support
Topic: C++ class::method() as driver callback
Replies: 3
Views: 3942

Re: C++ class::method() as driver callback

I routinely implement driver callbacks in C++. To do this, I usually derive classes from configuration structs rather than the driver structs. Here's an example:


class UART : protected UARTConfig {
protected:
UARTDriver &uart;

static void txend1_cb(UARTDriver *u);
static void txend2 ...
by andyturk
Fri Sep 06, 2013 12:16 am
Forum: ChibiOS/NIL
Topic: It's... alive!
Replies: 18
Views: 21829

Re: It's... alive!


Main differences:
1) In Nil threads cannot be created and cannot terminate, totally static. RT can start-terminate threads.
2) In Nil priorities are fixed, threads cannot change priority, this makes it impossible to implement proper mutexes with priority inheritance support.
3) Internal algorithms ...
by andyturk
Sat Apr 06, 2013 10:03 pm
Forum: STM32 Support
Topic: STM32L startup difficulties
Replies: 4
Views: 4234

Re: STM32L startup difficulties

Apparently, it's OK to leave nRST floating because it has an internal pull up. BOOT0 does not, so it can't be left floating.

Doh!

After tying BOOT0 to ground, the board boots normally. :D

Image
by andyturk
Sat Apr 06, 2013 9:20 pm
Forum: STM32 Support
Topic: STM32L startup difficulties
Replies: 4
Views: 4234

Re: STM32L startup difficulties


Could it be a problem with reset circuitry? it is possible it needs a longer reset state.


Umm, what reset circuitry?

When I've used F103 parts before, they worked fine without anything connected to nRST. Once power was applied, the mcu resets and runs normally.

Maybe the L is different in ...
by andyturk
Sat Apr 06, 2013 8:47 pm
Forum: STM32 Support
Topic: STM32L startup difficulties
Replies: 4
Views: 4234

STM32L startup difficulties

I'm bringing up a blinker app on a new homemade board with a STM32L151 running at 1.8V. The code seems to work fine... except when the mcu hard faults at power on. Usually, when I apply power, it faults (not sure where) and then sits in the hard fault handler drawing about 4mA. When the application ...
by andyturk
Wed Dec 26, 2012 6:25 pm
Forum: General Support
Topic: Locking out SPI while the ADC collects data
Replies: 5
Views: 4178

Re: Locking out SPI while the ADC collects data

You may try to slow down the SPI and program the SPI I/O to a slower setting, there are 4 possible speed setting on the F4. It is possible this would reduce the noise. The PAL driver has the macros to be used for speed settings, OR them with the I/O mode.

I might end up going that way as a last ...
by andyturk
Wed Dec 26, 2012 2:25 am
Forum: General Support
Topic: Locking out SPI while the ADC collects data
Replies: 5
Views: 4178

Re: Locking out SPI while the ADC collects data

Here's an illustration of the problem...

http://turkish.smugmug.com/Electronics/Sync/i-kdTnjpB/0/M/CA_12251217045178-M.jpg

The display is showing a 10 millivolt peak-to-peak square wave as sampled by the ADC. The high and low levels are a little crunchy, but I think that's a ...
by andyturk
Tue Dec 25, 2012 5:56 pm
Forum: General Support
Topic: Locking out SPI while the ADC collects data
Replies: 5
Views: 4178

Re: Locking out SPI while the ADC collects data

I think what you've described is pretty close to what I've got now. I.e., the code is arranged so that the ADC code only runs between display updates. It works, but it makes a mess of any frequency analysis of the ADC data because it starts and stops at effectively random intervals. What I hoping to ...