Search found 35 matches

by ruslanpopov
Sun Oct 26, 2014 3:22 pm
Forum: Development and Feedback
Topic: [NEWS] The ChibiOS Book
Replies: 71
Views: 57722

Re: [NEWS] The ChibiOS Book

Giovanni wrote:Hi,

See PMs, suggestions are welcome.

Giovanni


Thank you. Went to read the book.
by ruslanpopov
Sun Oct 26, 2014 8:18 am
Forum: Development and Feedback
Topic: [NEWS] The ChibiOS Book
Replies: 71
Views: 57722

Re: [NEWS] The ChibiOS Book

Re all. How can I take a look on the book?
by ruslanpopov
Thu May 22, 2014 8:14 pm
Forum: STM32 Support
Topic: RTC ith milliseconds resolution
Replies: 3
Views: 4253

Re: RTC ith milliseconds resolution

The final solution:

Code: Select all

uint32_t rtcGetTimeTmMilli(RTCDriver *rtcp, struct tm *timp) {
  RTCTime timespec = {0,0};

  rtcGetTime(rtcp, &timespec);
  localtime_r((time_t *)&(timespec.tv_sec), timp);
  return timespec.tv_msec;
}
by ruslanpopov
Thu May 22, 2014 7:26 pm
Forum: STM32 Support
Topic: RTC ith milliseconds resolution
Replies: 3
Views: 4253

Re: RTC ith milliseconds resolution

There is a problem. The macro STM32_RTC_HAS_SUBSECONDS is defined for RTCv2, but as I remember stm32f103 has to use RTCv1.

If I am right, any ideas to get milliseconds?

Update
Yes, I am right: link to post.
by ruslanpopov
Thu May 22, 2014 8:15 am
Forum: STM32 Support
Topic: RTC ith milliseconds resolution
Replies: 3
Views: 4253

RTC ith milliseconds resolution

Hi.

I need to get an information about current time with milliseconds resolution. I use function rtcGetTimeTm() and see in docs that tm structure has only field for seconds, not millisecond. It makes me think that I can't get milliseconds. But suddenly I have know that my stm32f103 has an ability ...
by ruslanpopov
Wed May 14, 2014 10:22 am
Forum: STM32 Support
Topic: Issue with I2C2 and SPI2
Replies: 28
Views: 20129

Re: Issue with I2C2 and SPI2

Unfortunately, I can use only SPI2 at this moment. I have a GPIO expander on I2C2 and microSD on SPI2. I need to write a data from GPIO to microSD periodically. I'm ready to write some code for ChibiOS but need some guidance.
by ruslanpopov
Wed May 14, 2014 7:52 am
Forum: STM32 Support
Topic: Issue with I2C2 and SPI2
Replies: 28
Views: 20129

Re: Issue with I2C2 and SPI2

As I see in this code I2C2 uses DMA 4&5 channels.:

#define STM32_HAS_I2C2 TRUE
#define STM32_I2C2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5))
#define STM32_I2C2_RX_DMA_CHN 0x00000000
#define STM32_I2C2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4))
#define STM32_I2C2_TX_DMA_CHN 0x00000000

And here ...
by ruslanpopov
Tue May 13, 2014 9:20 pm
Forum: STM32 Support
Topic: Issue with I2C2 and SPI2
Replies: 28
Views: 20129

Re: Issue with I2C2 and SPI2

wbober wrote:The issue we have is that when you switch off SPI and switch on I2C the later doesn't work properly. To deal with the problem we decided to modify the driver and use IRQs instead of DMA.


Can anyone explain what to do to use IRQs instead of DMA. It is not clear for me.
by ruslanpopov
Mon May 12, 2014 9:20 am
Forum: STM32 Support
Topic: Issue with I2C2 and SPI2
Replies: 28
Views: 20129

Re: Issue with I2C2 and SPI2

I have the same issue on STM32F103 with I2C2 & SPI2.
by ruslanpopov
Wed Oct 30, 2013 10:15 pm
Forum: General Support
Topic: command shell
Replies: 3
Views: 5944

Re: command shell

I have forgot to check the results of shellCreate:

if (th_shell == NULL) {
chprintf((BaseSequentialStream*) &SHELL_SD,
"cmd respawn: heap of %d bytes can not be allocated\n",
SHELL_WA_SIZE);
}

Then I reduce SHELL_WA_SIZE and it works now.