Search found 23 matches

by Vik
Sat Feb 15, 2014 4:55 pm
Forum: User Projects
Topic: [TODO] HAL for Watchdog timer (for STM32F10x)
Replies: 6
Views: 8771

Re: [TODO] HAL for Watchdog timer (for STM32F10x)

Hi all,

I can confirm that this works perfectly on the STM32F303 (F3 Discovery board).

Many thanks for this z80, I was just at the point where I would have needed to write it myself, so you saved me a few days of development time :)

Cheers,
Vik
by Vik
Thu Jun 27, 2013 4:23 pm
Forum: AVR Support
Topic: ATMega328 / Arduino
Replies: 24
Views: 27323

Re: ATMega328 / Arduino

Thanks for this, I'll test this evening but I expect that it will work fine.

A pedantic point about S2ST() though:

#define S2ST(sec) \
- ((systime_t)((sec) * CH_FREQUENCY))
+ ((systime_t)(((uint32_t)(sec)) * ((uint32_t)CH_FREQUENCY)))


This is probably a waste on architectures where systime_t ...
by Vik
Thu Jun 27, 2013 3:13 pm
Forum: AVR Support
Topic: ATMega328 / Arduino
Replies: 24
Views: 27323

Re: ATMega328 / Arduino

I'll add a cast to uint32_t to both the parameter and CH_FREQUENCY in next version.

Giovanni

Hi Giovanni,

The AVR patches are in trunk now, but they don't really work because of this bug. Can we fix it in trunk?

Btw, if you are going to use uint32_t, then you might want to change 1L and ...
by Vik
Wed Jun 26, 2013 3:30 pm
Forum: AVR Support
Topic: AVR GCC port
Replies: 14
Views: 16889

Re: AVR GCC port

Hi Fabio,

The multi-slave stuff is really a question / feature request for 3.0. I have a project that would need it but it should be doable by using pal instead.

Slave support is pretty much all I wanted to get working as it gives me a very convenient way of testing the driver. That's now done and ...
by Vik
Wed Jun 26, 2013 11:47 am
Forum: AVR Support
Topic: AVR GCC port
Replies: 14
Views: 16889

Re: AVR GCC port

The current SPI driver model does not support a slave mode, that kind of enhancement is necessarily a non-standard extension. I think a separate slave SPI driver model should be created but this is a task for ChibiOS 3.0.

Actually the changes required to support slave mode on the AVR are really ...
by Vik
Wed Jun 26, 2013 10:22 am
Forum: AVR Support
Topic: ATMega328 / Arduino
Replies: 24
Views: 27323

Re: ATMega328 / Arduino

Yes, those macros received a fix 3 weeks ago in order to fix a problem, probably this overflow is a side effect of the fix.

Yes, I can see the problem. It is a side effect.

Index: chibios-svn/os/kernel/include/chvt.h ...
by Vik
Tue Jun 25, 2013 1:01 am
Forum: AVR Support
Topic: AVR GCC port
Replies: 14
Views: 16889

Re: AVR GCC port

Hi Giovanni, thanks for this.

PM sent. SPI support (based on Fabio Utzig's work) pushed into my tree in the meantime (m)

I modified the driver so it also works in slave mode which has the benefit that you can use two devices to test each other.

I don't think everything will work out of the box ...
by Vik
Mon Jun 24, 2013 4:52 pm
Forum: AVR Support
Topic: AVR GCC port
Replies: 14
Views: 16889

Re: AVR GCC port

How about creating an AVR board and start moving threads related to this arch there so that things are better organized?

Giovanni will do that presumably once he's got his internet access sorted out again

In the meantime I'll probably have to write something like this and check how the compiler ...
by Vik
Thu Jun 20, 2013 7:18 pm
Forum: AVR Support
Topic: AVR GCC port
Replies: 14
Views: 16889

Re: AVR GCC port

The risk with pointers to registers is to increase the code size, each access would have to go through a pointer, loading a pointer requires several instructions.

That's a very good point, thanks. I did do a quick test though, and in this particular case it did not seem to make a difference ...
by Vik
Thu Jun 20, 2013 3:28 pm
Forum: AVR Support
Topic: AVR GCC port
Replies: 14
Views: 16889

Re: AVR GCC port

Hi Giovanni,

There is no rush. I'd like to get a few fundamental things right in the core though, because it will get harder to change that later. I was thinking about things like the best way of handling MCUs with multiple timers, serial ports, etc. without too much code duplication.

I think the ...