Modbus ASCII

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello everyone ,
I am trying to communicate using Modbus ASCII and slave device doesn't give a respond me.I am not sure about exact problem but I wonder a point.

I am using a function in UART interrupt and this interrupt changing fast, this is why if I try to access some variable in function that use some structs, in this case ,should I make my function volatile,I dont know.Normally 
if some global variables changing fast in interrupt,I am making them volatile.

 

void COM_ISR_HANDLER(void)
{
	char c;
	usart_read(COM, &c);
	ModbusASCII_Get_Serial(c);
}

 

Last Edited: Thu. Mar 14, 2019 - 06:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

volatile isn't required here.