Search found 10 matches

by kiv
Sun Sep 06, 2015 2:47 pm
Forum: ChibiOS/HAL
Topic: Includes from halconf.h
Replies: 5
Views: 4222

Re: Includes from halconf.h

The driver includes halconf.h so probably your macro is not taken or is overwritten.

Giovanni
I've noticed that even matters are commented out in the description halconf.h.

#include "some_file.h" -- Some file contains real HAL_USE_SERIAL and HAL_USE_USB defines.
..&#46 ...
by kiv
Sun Sep 06, 2015 2:24 pm
Forum: ChibiOS/HAL
Topic: Includes from halconf.h
Replies: 5
Views: 4222

Re: Includes from halconf.h

What error are you getting?

Giovanni

Compiling hal.c
Compiling st.c
Compiling hal_queues.c
Compiling hal_mmcsd.c
Compiling pal.c
Compiling nvic.c
Compiling stm32_dma.c
Compiling hal_lld.c
Compiling st_lld.c
Compiling pal_lld.c
Compiling board.c ...
by kiv
Sun Sep 06, 2015 1:44 pm
Forum: ChibiOS/HAL
Topic: Includes from halconf.h
Replies: 5
Views: 4222

Includes from halconf.h

If I enable a part of HAL in halconf.h it works (for example, enable USB by #define HAL_USE_USB).
If I include another file to halconf.h and declare this define in it, but not in halconf.h, I got a link error.
Definions from enabled module available to my code, but object files with implementation ...
by kiv
Fri Aug 07, 2015 10:30 pm
Forum: General Support
Topic: The transfer large amounts of data through the USB CDC
Replies: 2
Views: 2093

Re: The transfer large amounts of data through the USB CDC

I used GDB, to see the backtrace at the time when the microcontroller enters an infinite loop. And I see what happens assert failed because of a timeout communication I2C. Apparently I put too small a timeout and data transfer via USB microcontroller is too loaded. I increased the timeout and it ...
by kiv
Fri Aug 07, 2015 10:11 pm
Forum: General Support
Topic: Time measurement units
Replies: 5
Views: 3304

Re: Time measurement units

Thank you. If I use RTC2US(STM32_SYSCLK, ...), it turns to normal (I tested the validity of measurements, measuring the duration chThdSleepMilliseconds(1)). However, so I lost a cross-platform (STM32_SYSCLK defined only for microcontrollers STM32). It's not so important now, but would like to learn ...
by kiv
Fri Aug 07, 2015 9:56 pm
Forum: General Support
Topic: The transfer large amounts of data through the USB CDC
Replies: 2
Views: 2093

The transfer large amounts of data through the USB CDC

I use chprintf and SerialUSBDriver, to transmit data to a computer. If frequently (10 Hz) to transmit the string longer than the size of the end point (64 bytes by default), the device hangs at an arbitrary moment. If transmit data infrequently (1 Hz) or less than the size of the end point ...
by kiv
Fri Aug 07, 2015 9:40 pm
Forum: General Support
Topic: Time measurement units
Replies: 5
Views: 3304

Re: Time measurement units



Good. However, this function requires frequency value of the real time counter, but I do not know it. The Doxygen described function halGetCounterFrequency, which will let me know this value, but I use ChibiOS 3.0.0, which not contains function with this name (maybe it was renamed).
by kiv
Fri Aug 07, 2015 9:02 pm
Forum: General Support
Topic: Time measurement units
Replies: 5
Views: 3304

Time measurement units

How to translate the results of the measurement of time with the functions chTMStartMeasurementX and chTMStopMeasurementX to microseconds?
I use board STM32F4-DISCOVERY, if it is important, and the measurement results do not look like a millisecond, microsecond or system ticks.
by kiv
Fri Aug 07, 2015 6:53 pm
Forum: General Support
Topic: How to use periodic event timer?
Replies: 2
Views: 2646

Re: How to use periodic event timer?

Yes, it was the problem. I corrected the error and it worked. Thank you very much.
by kiv
Fri Aug 07, 2015 5:21 pm
Forum: General Support
Topic: How to use periodic event timer?
Replies: 2
Views: 2646

How to use periodic event timer?

I need to interrogate a set of sensors with a certain frequency. I want to run this separate thread that will be waiting for the timer and do polling. Here is a fragment of my code:

static event_timer_t sensorsPollTimer;
#define POLL_TIMER_EVENT_MASK EVENT_MASK(1)

static THD_WORKING_AREA ...