View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Tue Oct 22, 2019 3:47 am |
|
|
Good, you move forwards.
But, still nothing added to limit the value of buffer_ind. This really must be
handled. |
|
|
PrinceNai
Joined: 31 Oct 2016 Posts: 478 Location: Montenegro
|
|
Posted: Tue Oct 22, 2019 3:53 am |
|
|
Nice that you solved your problem :-). But you'll likely run into another problem, if you'll talk with the GSM for long enough. You have to wrap buffer_ind back to 0 when you fill the buffer, otherwise the data from GSM will start overwriting locations above your allocated buffer size. |
|
|
camleot23
Joined: 16 Aug 2019 Posts: 52
|
|
Posted: Tue Oct 22, 2019 4:45 am |
|
|
Yes I know you are right. I've already added it. Thank you for your care. I'm debugging all the time and sometimes I forget to add some lines. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Tue Oct 22, 2019 4:58 am |
|
|
As a comment, 'moving on', I notice you were using software serial
for the RS485 link. Given your chip has a second UART, consider using this.
Otherwise the receive ISR 'risks' resulting in bit width corruption on this
port. |
|
|
camleot23
Joined: 16 Aug 2019 Posts: 52
|
|
Posted: Tue Oct 22, 2019 7:26 am |
|
|
Hmm.. I didn't know. Okay, I will definitely consider it. Thank you very much for sharing your thoughts with me.)
You are number one! |
|
|
|