2014-03-19 04:41 AM
In some peripheral some API is needed,for example API functions for read and write to a GPIO port is needed(write/read to/from all pins at one operation).
another example in usart API functions, that for receiver we need a function that can get a given number of bytes and return on timeout if no further bytes is received for a give timeout. for write protocols like as modbus RTU slave this is needed,we can get predefined number of bytes in Rx,some times number of Rx bytes in packet is not known and depends on external device response.2014-10-09 02:49 AM
Hi,
The point concerning the HAL GPIO, is confirmed. Otherwise for USART or other communication IPs, we provide within the HAL drivers some APIs that receive an amount of data in Polling, Interrupt and DMA modes, where we already fix the parameter Size: Amount of data to be received. You've just to customize the available APIs for your personal usage, since the provided APIs are generic for general use. You can refer to this [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/Using%20STM32FCubeMX%20HAL%20Drivers%20for%20UART%20RX%20with%20unknown%20size%20data¤tviews=324]post, that my shed some light on what are you looking for.Thanks for the feedbacks.Regards,Heisenberg.