Problem still exists. If we pass a variable to the mailbox, then everything is fine.
c1.png
Debug terminal
post -> 0
fetch -> 0
post -> 1
post -> 2
post -> 3
fetch -> 1
post -> 4
post -> 5
post -> 6
fetch -> 2
post -> 7
post -> 8
post -> 9
fetch -> 3
post -> 10
post -> 11
post -> 12
fetch -> 4 ...
Search found 27 matches
- Mon Apr 23, 2018 8:48 am
- Forum: ChibiOS/RT
- Topic: Strange behavior of mailboxes
- Replies: 6
- Views: 6061
- Mon Apr 23, 2018 6:36 am
- Forum: ChibiOS/RT
- Topic: Strange behavior of mailboxes
- Replies: 6
- Views: 6061
Re: Strange behavior of mailboxes
Everything works on a different board.
Apparently, there was a hardware error.
For a long time I've been using the system and mailboxes, I've never had any problems before.
Giovanni, thanks for the excellent OS!
Apparently, there was a hardware error.
For a long time I've been using the system and mailboxes, I've never had any problems before.
Giovanni, thanks for the excellent OS!
- Fri Apr 20, 2018 8:02 pm
- Forum: ChibiOS/RT
- Topic: Strange behavior of mailboxes
- Replies: 6
- Views: 6061
Re: Strange behavior of mailboxes
Thanks, I tried your advice, it did not help.
The problem disappears only if you remove the delay of 30 ms after sending CAN messages. Then messages from the mailbox are not lost.
But the delay is needed not to overload the CANbus
canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, MS2ST(100 ...
The problem disappears only if you remove the delay of 30 ms after sending CAN messages. Then messages from the mailbox are not lost.
But the delay is needed not to overload the CANbus
canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, MS2ST(100 ...
- Fri Apr 20, 2018 4:45 pm
- Forum: ChibiOS/RT
- Topic: Strange behavior of mailboxes
- Replies: 6
- Views: 6061
Strange behavior of mailboxes
simple example, compiles without errors and warnings
chibios 16.1.9
#include "ch.h"
#include "hal.h"
#define MODULE_ID 222
#define CAN_BUFFER_SIZE 32
mailbox_t can_send_mailbox;
msg_t can_send_buffer[CAN_BUFFER_SIZE];
static const CANConfig cancfg = {CAN_MCR_ABOM | CAN_MCR_AWUM ...
chibios 16.1.9
#include "ch.h"
#include "hal.h"
#define MODULE_ID 222
#define CAN_BUFFER_SIZE 32
mailbox_t can_send_mailbox;
msg_t can_send_buffer[CAN_BUFFER_SIZE];
static const CANConfig cancfg = {CAN_MCR_ABOM | CAN_MCR_AWUM ...
- Sat Aug 26, 2017 11:55 am
- Forum: ChibiOS/RT
- Topic: stm32f103 write/erase internal Flash
- Replies: 2
- Views: 3329
Re: stm32f103 write/erase internal Flash
/*
* HAL driver system settings.
*/
#define STM32_NO_INIT FALSE
#define STM32_HSI_ENABLED TRUE // default FALSE
#define STM32_LSI_ENABLED FALSE
#define STM32_HSE_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
#define STM32_SW STM32_SW_PLL // system clock mux
#define STM32_PLLSRC STM32_PLLSRC ...
- Fri Aug 25, 2017 7:48 pm
- Forum: ChibiOS/RT
- Topic: stm32f103 write/erase internal Flash
- Replies: 2
- Views: 3329
stm32f103 write/erase internal Flash
With this configuration, writing or erase to the internal flash causes an error.
#define STM32_HSI_ENABLED FALSE
#define STM32_LSI_ENABLED FALSE
#define STM32_HSE_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
If I resolve the internal and external clock, then everything works.
#define STM32_HSI ...
#define STM32_HSI_ENABLED FALSE
#define STM32_LSI_ENABLED FALSE
#define STM32_HSE_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
If I resolve the internal and external clock, then everything works.
#define STM32_HSI ...
- Thu Mar 03, 2016 11:03 am
- Forum: Bug Reports
- Topic: error CAN settings in HAL example
- Replies: 5
- Views: 6100
Re: error CAN settings in HAL example
I just started with this calculator, it is the same error 
I am attaching the file correct calculation...
I am attaching the file correct calculation...
- Tue Mar 01, 2016 8:44 pm
- Forum: Bug Reports
- Topic: error CAN settings in HAL example
- Replies: 5
- Views: 6100
error CAN settings in HAL example
testhal\STM32\STM32F1xx\CAN\main.c
/*
* Internal loopback mode, 500KBaud, automatic wakeup, automatic recover
* from abort mode.
* See section 22.7.7 on the STM32 reference manual.
*/
static const CANConfig cancfg = {
CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP,
CAN_BTR_LBKM ...
/*
* Internal loopback mode, 500KBaud, automatic wakeup, automatic recover
* from abort mode.
* See section 22.7.7 on the STM32 reference manual.
*/
static const CANConfig cancfg = {
CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP,
CAN_BTR_LBKM ...
- Sun Jan 31, 2016 4:17 pm
- Forum: General Support
- Topic: ChibiOS 3 vs 16 Code size
- Replies: 3
- Views: 3835
Re: ChibiOS 3 vs 16 Code size
I compiled a simple example.
Chibios 162 is more compact.
#include "ch.h"
#include "hal.h"
static THD_WORKING_AREA(waThread1, 128);
static THD_FUNCTION(Thread1, arg) {
(void)arg;
chRegSetThreadName("blinker");
while (true) {
palSetPad(GPIOD, GPIOD_LED3); /* Orange. ...
Chibios 162 is more compact.
#include "ch.h"
#include "hal.h"
static THD_WORKING_AREA(waThread1, 128);
static THD_FUNCTION(Thread1, arg) {
(void)arg;
chRegSetThreadName("blinker");
while (true) {
palSetPad(GPIOD, GPIOD_LED3); /* Orange. ...
- Fri Jan 29, 2016 2:49 pm
- Forum: General Support
- Topic: stm32f4discovery+lan8720+lwip not worked...
- Replies: 7
- Views: 6441
Re: stm32f4discovery+lan8720+lwip not worked...
I did it
include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407_REV_D/board.mk
I have separately:
stm32f4discovery
http://thumbs.ebaystatic.com/images/g/cC4AAOSwBLlVE9EV/s-l96.jpg
and
http://g-search1.alicdn.com/bao/uploaded/i3/T1NlBGFJRbXXXXXXXX_!!0-item_pic. ...
include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407_REV_D/board.mk
I have separately:
stm32f4discovery
http://thumbs.ebaystatic.com/images/g/cC4AAOSwBLlVE9EV/s-l96.jpg
and
http://g-search1.alicdn.com/bao/uploaded/i3/T1NlBGFJRbXXXXXXXX_!!0-item_pic. ...