It would be cleaner not to enable an interrupt, and let the user do all the setup in the config - it's making it more difficult to initialize from scratch, but give better control.
I have extended my config to include cr1 and cr2 to be able to setup TRGO - so it's no big deal..
Making an assert of ...
Search found 8 matches
- Sun Jan 12, 2014 1:04 am
- Forum: General Support
- Topic: Bug in gpt_lld.c Callback pointer not verified.
- Replies: 2
- Views: 1908
- Fri Jan 10, 2014 9:17 pm
- Forum: General Support
- Topic: Bug in gpt_lld.c Callback pointer not verified.
- Replies: 2
- Views: 1908
Bug in gpt_lld.c Callback pointer not verified.
release 2.6.2
I just fell into this bug, defining the callback NULL causes a crash
the code misses a check that the pointer is not NULL
if (gptp->config->callback != NULL )
gptp->config->callback(gptp);
original code:
/**
* @brief Shared IRQ handler.
*
* @param[in] gptp pointer to a @p ...
I just fell into this bug, defining the callback NULL causes a crash
the code misses a check that the pointer is not NULL
if (gptp->config->callback != NULL )
gptp->config->callback(gptp);
original code:
/**
* @brief Shared IRQ handler.
*
* @param[in] gptp pointer to a @p ...
- Mon Dec 02, 2013 11:09 pm
- Forum: General Support
- Topic: Sugestion regardin portable code between multiple HW's
- Replies: 7
- Views: 3851
Re: Sugestion regardin portable code between multiple HW's
Hi again...
Although it looked straight forward it wasn't :/
the code
#define GPIO_LED_TX_RED GPIOB,14
#define GPIO_LED_PWR_GREEN GPIOB,15
is OK, the macro substitution is not, it still need an extra invokation to make the 'single' argument expand into two for it to work as expected.
So ...
Although it looked straight forward it wasn't :/
the code
#define GPIO_LED_TX_RED GPIOB,14
#define GPIO_LED_PWR_GREEN GPIOB,15
is OK, the macro substitution is not, it still need an extra invokation to make the 'single' argument expand into two for it to work as expected.
So ...
- Mon Dec 02, 2013 4:33 pm
- Forum: General Support
- Topic: Sugestion regardin portable code between multiple HW's
- Replies: 7
- Views: 3851
Re: Sugestion regardin portable code between multiple HW's
Thank you Giovanni,
I'm just happy that you will implement in such a way, that code can be hw-independant.
I like your way of doing it, much better than my own... obviously I'm no expert
regards
Svend
I'm just happy that you will implement in such a way, that code can be hw-independant.
I like your way of doing it, much better than my own... obviously I'm no expert
regards
Svend
- Mon Dec 02, 2013 10:37 am
- Forum: General Support
- Topic: Sugestion regardin portable code between multiple HW's
- Replies: 7
- Views: 3851
Re: Sugestion regardin portable code between multiple HW's
correction!
WRONG! looses MSB
#define GPIO_LED_TX_RED ( (uint64_t)((uint32_t) GPIOB << 4) + GPIO14 )
#define GPIO_LED_PWR_GREEN ( (uint64_t)((uint32_t) GPIOB << 4) + GPIO15 )
correct:
#define GPIO_LED_TX_RED ( ((uint64_t)(uint32_t) GPIOB << 4) + GPIO14 )
#define GPIO_LED_PWR_GREEN ( ((uint64 ...
WRONG! looses MSB
#define GPIO_LED_TX_RED ( (uint64_t)((uint32_t) GPIOB << 4) + GPIO14 )
#define GPIO_LED_PWR_GREEN ( (uint64_t)((uint32_t) GPIOB << 4) + GPIO15 )
correct:
#define GPIO_LED_TX_RED ( ((uint64_t)(uint32_t) GPIOB << 4) + GPIO14 )
#define GPIO_LED_PWR_GREEN ( ((uint64 ...
- Sun Dec 01, 2013 9:49 pm
- Forum: General Support
- Topic: Sugestion regardin portable code between multiple HW's
- Replies: 7
- Views: 3851
Re: Sugestion regardin portable code between multiple HW's
short update..
the original board.h additions created some warnings, so GPIO definitions changing from
#define GPIO_LED_TX_RED ( ( (uint64_t)GPIOB << 4) + GPIO14 )
#define GPIO_LED_PWR_GREEN ( ( (uint64_t) GPIOB << 4) + GPIO15 )
to
#define GPIO_LED_TX_RED ( (uint64_t)((uint32_t) GPIOB << 4 ...
the original board.h additions created some warnings, so GPIO definitions changing from
#define GPIO_LED_TX_RED ( ( (uint64_t)GPIOB << 4) + GPIO14 )
#define GPIO_LED_PWR_GREEN ( ( (uint64_t) GPIOB << 4) + GPIO15 )
to
#define GPIO_LED_TX_RED ( (uint64_t)((uint32_t) GPIOB << 4 ...
- Thu Nov 28, 2013 10:00 pm
- Forum: General Support
- Topic: Sugestion regardin portable code between multiple HW's
- Replies: 7
- Views: 3851
Re: Sugestion regardin portable code between multiple HW's
Thanks Giovanni,
I like ChibiOS alot and use ChibiStudio - (I also have a paid version of different make, also Eclipse based.... not using that anymore )
Is it possible to get the extra definitions generated by the xml rocessor? (i'd do it if I can..)
I changed pal.h again, made it a bit nicer, I ...
I like ChibiOS alot and use ChibiStudio - (I also have a paid version of different make, also Eclipse based.... not using that anymore )
Is it possible to get the extra definitions generated by the xml rocessor? (i'd do it if I can..)
I changed pal.h again, made it a bit nicer, I ...
- Thu Nov 28, 2013 4:07 pm
- Forum: General Support
- Topic: Sugestion regardin portable code between multiple HW's
- Replies: 7
- Views: 3851
Sugestion regardin portable code between multiple HW's
Hi, I have a suggestion to the PAL / board.chcfg.
I use my code on several different HW platforms though at this moment ony with STM32F4 cpu. But this is not something that is much specific to any particular cpu.
I had the issue when moving a few leds of my bootloader when I had to implement it on ...
I use my code on several different HW platforms though at this moment ony with STM32F4 cpu. But this is not something that is much specific to any particular cpu.
I had the issue when moving a few leds of my bootloader when I had to implement it on ...