How to use the 'HAL_UART_Receive_IT' for receiving large data like from GSM ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-03-04 2:40 AM
Hello guys,
hello @KnarfB ,@Community member
I am struggling with this thing from past one month.
I am using Quectel M66 gsm module and stm32f030cct6 controller.
I am not able use UART interrupt for receiving large data when using gsm over uart.
how do i receive phone number when there is a call on gsm.?
Not able to store or display the data via uart on controller.
please help me out.
just give me help on code how to write that particular so that i can use it in my code.
Thank you.
Solved! Go to Solution.
- Labels:
-
STM32F0 Series
-
UART-USART
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-03-29 12:31 PM
Hello,
I found the solution for this
uint8_t GSM_RX_BUFFER[MAX], GSM_DATA, BUFFER_INDEX = 0;
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
if(huart->Instance == USART2)
{
GSM_RX_BUFFER[BUFFER_INDEX] = GSM_DATA;
BUFFER_INDEX++;
HAL_UART_Receive_IT(&GSM_UART,&GSM_DATA,1);
}
}
with the help of this i can read the uart in interrupt mode.
after executing at command call the interrupt and then reset the index and clear the buffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-03-05 12:27 AM
Hello guys,
@Community member ,@Piranha
please look into this matter also
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-03-09 1:37 PM
Talking to a AT modem can be a tedious task. There maybe multi-line answers, spontaneous reports etc.. Don't have ready-to-use bullet-proof code for your device. In principle, you have to combine a state-based character-by-character parser with proper timeout handling. If you check github etc.. you will find code (of varying quality).
KnarfB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-03-09 10:37 PM
Thanks @KnarfB ,
do you have any github link for such things?
I am searching for those.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-03-09 10:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-03-29 12:31 PM
Hello,
I found the solution for this
uint8_t GSM_RX_BUFFER[MAX], GSM_DATA, BUFFER_INDEX = 0;
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
if(huart->Instance == USART2)
{
GSM_RX_BUFFER[BUFFER_INDEX] = GSM_DATA;
BUFFER_INDEX++;
HAL_UART_Receive_IT(&GSM_UART,&GSM_DATA,1);
}
}
with the help of this i can read the uart in interrupt mode.
after executing at command call the interrupt and then reset the index and clear the buffer.
