Search found 66 matches

by ceremcem
Thu Jun 20, 2019 12:31 pm
Forum: General Support
Topic: How to properly pass argument to palSetPadCallback's callback? Topic is solved
Replies: 2
Views: 588

Re: How to properly pass argument to palSetPadCallback's callback? Topic is solved

Now all warnings are vanished. Here is my changes: I changed my handler function from: void button_callback(uint8_t pad){ ... } to: void button_callback(void * _pad){ uint8_t pad = *((uint8_t *) _pad); ... } and palSetPadCallback() invocation from palSetPadCallback(GPIOA, DOWNWARD_BUTTON, button_cal...
by ceremcem
Thu Jun 20, 2019 10:39 am
Forum: STM32 Support
Topic: Virtual control interface via semihosting
Replies: 11
Views: 6022

Re: Virtual control interface via semihosting

inca wrote:I recently got semihosting up and going again using ChibiStudio (without chibi or chibi hal, unfortunely) and STM32 STD PERIPH lib.



Is there an example project for introduction to semihosting?
by ceremcem
Thu Jun 20, 2019 9:30 am
Forum: General Support
Topic: How to properly pass argument to palSetPadCallback's callback? Topic is solved
Replies: 2
Views: 588

How to properly pass argument to palSetPadCallback's callback? Topic is solved

I have a function which takes the button_number as an argument and decides the action according to the button_number. My button setup is as follows: // forward button palSetPadMode(GPIOA, UPWARD_BUTTON, PAL_MODE_INPUT); palEnablePadEvent(GPIOA, UPWARD_BUTTON, PAL_EVENT_MODE_BOTH_EDGES); palSetPadCal...
by ceremcem
Wed Jun 19, 2019 8:14 pm
Forum: General Support
Topic: How to split halconf.h?
Replies: 5
Views: 510

Re: How to split halconf.h?

It seems that we are having a tiny communication issue here. Let me explain my proposal: Current Status 1. I'm using Chibi-project which is the command line alternative to the Chibi-Studio. 2. I'm copying the default halconf.h into application directory into the hardware declaration folder . 3. I'm ...
by ceremcem
Wed Jun 19, 2019 7:39 pm
Forum: General Support
Topic: How to split halconf.h?
Replies: 5
Views: 510

Re: How to split halconf.h?

Hi, That file is meant to be edited, it is a configuration file. Giovanni I'm trying to simplify reading and the upgrade process of application specific configuration by separating overrides from the rest of default configuration. That's why I don't want to modify the configurations in place , but ...
by ceremcem
Wed Jun 19, 2019 2:18 pm
Forum: General Support
Topic: How to split halconf.h?
Replies: 5
Views: 510

How to split halconf.h?

I prefer not to alter the default lines (eg. from "FALSE" to "TRUE"): /** * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) #define HAL_USE_PWM FALSE #endif ...but overwrite them at the beginning of "halconf.h": // ---------- Overw...
by ceremcem
Wed Jun 19, 2019 9:37 am
Forum: STM32 Support
Topic: spiExchange problem Topic is solved
Replies: 8
Views: 688

Re: spiExchange problem Topic is solved

Giovanni wrote:For me is hard to provide support on modified code
Giovanni


That's quite understandable. I was not aware that there were examples in the /testhal directory (I thought they were only for tests, so they are for ChibiOS developers, not for ChibiOS users). That was very useful to know.
by ceremcem
Wed Jun 19, 2019 7:57 am
Forum: STM32 Support
Topic: spiExchange problem Topic is solved
Replies: 8
Views: 688

Re: spiExchange problem Topic is solved

Giovanni wrote:Consider that those files are customized, it is not what is generated by ChibiOS XML processor.

Giovanni


I may not quite get how I should conclude this. Do you mean that the examples under /testhal are more reliable as a reference since they aren't autogenerated?
by ceremcem
Wed Jun 19, 2019 5:52 am
Forum: STM32 Support
Topic: spiExchange problem Topic is solved
Replies: 8
Views: 688

Re: spiExchange problem Topic is solved

It turns out I had a problem with configuring the IO pin alternate mode. This line helped me to make this fix : #define VAL_GPIOA_MODER (GPIOA_MODER_DEFAULT \ | PIN_MODE_ALTERNATE(GPIOA_SPI1_MOSI) \ - | PIN_MODE_INPUT(GPIOA_SPI1_MISO) \ + | PIN_MODE_ALTERNATE(GPIOA_SPI1_MISO) \ | PIN_MODE_ALTERNATE(...
by ceremcem
Tue Jun 18, 2019 3:55 pm
Forum: STM32 Support
Topic: spiExchange problem Topic is solved
Replies: 8
Views: 688

Re: spiExchange problem Topic is solved

Giovanni wrote:Are pins programmed in the correct alternate mode?

Giovanni


I think so: https://github.com/ceremcem/chibi-examp ... .h#L41-L67

Go to advanced search