Search found 51 matches

by 0x3333
Fri Aug 16, 2019 6:55 pm
Forum: Bug Reports
Topic: Bug on HAL when compiling with smart_build disabled
Replies: 1
Views: 116

Bug on HAL when compiling with smart_build disabled

In the hal.mk file, when compiling without smart_build enabled, "hal_flash.c" is missing in the HALSRC variable. Also I relocated hal_st.c to the same position when smart_build is enabled. diff --git a/os/hal/hal.mk b/os/hal/hal.mk index 71b325ad1..dfba65c25 100644 --- a/os/hal/hal.mk +++ ...
by 0x3333
Mon Aug 12, 2019 2:52 pm
Forum: ChibiOS/HAL
Topic: Doubt regarding drivers implementation
Replies: 19
Views: 922

Re: Doubt regarding drivers implementation

Attached is the version with start bit detection on state machine. As usual, also in the git repo: https://github.com/0x3333/chibios_svn_mirror/tree/softserial/os/hal/lib/complex/soft_serial Would this be included in the Chibios as a driver? If not, I'll stop here, as it fits my needs, otherwise, I ...
by 0x3333
Mon Aug 12, 2019 12:19 pm
Forum: ChibiOS/HAL
Topic: Doubt regarding drivers implementation
Replies: 19
Views: 922

Re: Doubt regarding drivers implementation

Hi Giovanni, 1 - OK 2 - OK, will make 4x "default" in the driver comments. 3 - In the way I conceived, the start bit was handled by an interrupt, change the state of the RX and exit. But after reading your message, I realized that it is pretty dumb. I can just read the port to check if the...
by 0x3333
Fri Aug 09, 2019 8:46 pm
Forum: ChibiOS/HAL
Topic: Doubt regarding drivers implementation
Replies: 19
Views: 922

Re: Doubt regarding drivers implementation

Just in case, this is in my git repo on GitHub:

https://github.com/0x3333/chibios_svn_m ... oft_serial

Thanks.
by 0x3333
Fri Aug 09, 2019 4:07 pm
Forum: ChibiOS/HAL
Topic: Doubt regarding drivers implementation
Replies: 19
Views: 922

Re: Doubt regarding drivers implementation

Here we go. I'm almost done, just need your feedback on some points. First, let's explain how it works. The interface is a copy of Serial Driver, with the exception of the LLD part, which I don't have, for obvious reasons. The driver works around a tick function, ssdTickI, that must be called by the...
by 0x3333
Mon Aug 05, 2019 8:38 pm
Forum: ChibiOS/HAL
Topic: Doubt regarding drivers implementation
Replies: 19
Views: 922

Re: Doubt regarding drivers implementation

Well, that's what I did :) This function(State machine) is called every GPT tick. typedef enum { SSD_RX_STOP = 0, /**< Stopped. */ SSD_RX_WAIT_START = 1, /**< Waiting start bit. */ SSD_RX_BIT = 2, /**< Receiving bit. */ SSD_RX_WAIT_STOP = 3 /**< Waiting stop bit. */ } ssdrxstate_t; static inline voi...
by 0x3333
Mon Aug 05, 2019 8:15 pm
Forum: ChibiOS/HAL
Topic: Doubt regarding drivers implementation
Replies: 19
Views: 922

Re: Doubt regarding drivers implementation

To detect start bit, I'm using PAL event, should this be delegated to the user too?

Code: Select all

palEnableLineEvent(ssdp->config->rx, PAL_EVENT_MODE_FALLING_EDGE);
palSetLineCallback(ssdp->config->rx, (palcallback_t)_pal_interrupt, ssdp);
by 0x3333
Mon Aug 05, 2019 8:09 pm
Forum: ChibiOS/HAL
Topic: Doubt regarding drivers implementation
Replies: 19
Views: 922

Re: Doubt regarding drivers implementation

Wow, that was fast! 1) I'm not sure if I'm using any ch function, as long as I can tell, I'm only using chnAddFlagsI that starts with "ch". 2) I followed the i2c fallback as example, it has some instances defined, so I just believed it was the norm. Removed. /** @brief I2C1 driver identifi...
by 0x3333
Mon Aug 05, 2019 7:42 pm
Forum: ChibiOS/HAL
Topic: Doubt regarding drivers implementation
Replies: 19
Views: 922

Re: Doubt regarding drivers implementation

I don't have it working as a driver yet, but in my fork, on Github(alex31 mirror) you can see in the softserial branch, basically os/hal/lib/complex/soft_serial folder. https://github.com/0x3333/chibios_svn_mirror/tree/softserial/os/hal/lib/complex/soft_serial This is not tested and is probably brok...
by 0x3333
Sat Aug 03, 2019 10:43 pm
Forum: ChibiOS/HAL
Topic: Doubt regarding drivers implementation
Replies: 19
Views: 922

Re: Doubt regarding drivers implementation

Hi! Sorry to dig up this post, but I started creating the driver for the software serial after finally made it work. I created a pseudo-driver in my app, that uses PAL and GPT to create multiple software serials. I use PAL line events to detect start bit(PAL_EVENT_MODE_FALLING_EDGE) and GPT in conti...

Go to advanced search