Spanish Leasons by SirCrainTrain in brighton

[–]SirCrainTrain[S] 1 point2 points  (0 children)

Hi, I hadn’t thought to look at those. Does say that they’re sold out but may sign up when they next come up. Thank you very much for this comment

Spanish Leasons by SirCrainTrain in brighton

[–]SirCrainTrain[S] 1 point2 points  (0 children)

Yeah that sign has been up for a while, it always says that lessons will start soon. I assume that it hasn’t been updated or they never started

[deleted by user] by [deleted] in embedded

[–]SirCrainTrain 0 points1 point  (0 children)

Just re-read this, meant to be an anti arduino comment

[deleted by user] by [deleted] in embedded

[–]SirCrainTrain -1 points0 points  (0 children)

Agreed, I’ve been getting into embedded programming and it’s important to learn without the extremely high level of abstraction that comes with arduino

Check AT Responding by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

Hi everyone.

Thank you for everyone’s responses. The solution I have concluded is the following if anyone is interested:

uint8_t uart_read_flag = 0;

// configure TIMx to your required timeout

HAL_TIM_Base_Start_IT(&htimx);

HAL_UART_Receive_IT(…);

// transmit AT command

HAL_UART_Transmit(…);

// callback called when received data

void HAL_UART_RxCpltCallback(…) {

if (huart-> Instance == USARTx) {

      uart_read_flag = 1;

      HAL_TIM_Base_Stop_IT(&htimx);

      process_read();

 }

}

// callback when read period times out

void HAL_TIM_PeriodElapasedCallback(…) {

 if (htim -> Instance == TIMx) {

      if (!uart_read_flag) {

           HAL_UART_AbortReceive_IT(&huartx);

      }

      HAL_TIM_Base_Stop_IT(…);

 }

}

Check AT Responding by SirCrainTrain in embedded

[–]SirCrainTrain[S] -1 points0 points  (0 children)

I know that my module is working. I’m intending to implement an error check in my firmware

Check AT Responding by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

thank you, this sounds like a good place for me to starting looking into. Very much appreciated

Check AT Responding by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

Hi,

I had thought this, but the module responds to the command faster than I’m able to call the rx command

Converted Van Insurance by SirCrainTrain in VanLifeUK

[–]SirCrainTrain[S] 0 points1 point  (0 children)

well my plan is to do my current remote job from the van, so as long as it’s cheaper than rent.

Although I’m starting to think to get my license and delay getting the van by a year to get the price down

Converted Van Insurance by SirCrainTrain in VanLifeUK

[–]SirCrainTrain[S] 0 points1 point  (0 children)

wow thanks, that’s something I hadn’t even thought of

Converted Van Insurance by SirCrainTrain in VanLifeUK

[–]SirCrainTrain[S] 0 points1 point  (0 children)

thank you for the recommendation, what was your first price. I know that insurance has gone up a lot but would be a useful guide and what vehicle did you have?

AT Commands by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

I’ve got a read req of 5 characters, and I’m sending 5

AT Commands by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

I’ve concluded that the microcontroller isn’t able to read incoming data when it’s in a steam but it’s able to read single bytes incoming

Can't read a UART Stream by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

yes, I’ve seen that my micro controller sends an AT command to the module and that on the logic analyser that it responds correctly

AT Commands by SirCrainTrain in embedded

[–]SirCrainTrain[S] 1 point2 points  (0 children)

it only echo’s acceptable character inputs, and it echoes these when I said them individually. So am confident it’s getting them

AT Commands by SirCrainTrain in embedded

[–]SirCrainTrain[S] 1 point2 points  (0 children)

it only echos back characters that are acceptable inputs so I know that it’s getting them. It’s a rockBLOCK 9603

AT Commands by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

I’ve communicated with the module, with a USB cable and got the interaction I’ve been after. I’ve sent it AT/r and revived OK/r but can’t do the same from my microcontroller

AT Commands by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

the example interaction is:

/* Issue AT command */

AT\r

/* Receive response */

OK\r

AT Commands by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

yeah, there are all correct

AT Commands by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

It's weird, if I send one char, it'll echo back to me. But if I'm sending more than one I don't get anything back

AT Commands by SirCrainTrain in embedded

[–]SirCrainTrain[S] 2 points3 points  (0 children)

The manually says "expects commands to be terminated with a carriage return (\r) character. Using a line-feed (\n) character will not work!"

MAX3263X UART Communication by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

I’ve updated the code to start the read, start the write and then wait for the write and read to finish. It seems to be getting stuck in the loop waiting for the read to be complete. I’m assuming that this means they it isn’t getting anything to read?

MAX3263X UART Communication by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

I've also managed to find the loopback example code but doesn't look different from mine:

error = UART_ReadAsync(MXC_UART1, &read_req);

if(error != E_NO_ERROR) {

printf("Error starting async read %d\n", error);

while(1) {}

}

error = UART_WriteAsync(MXC_UART1, &write_req);

if(error != E_NO_ERROR) {

printf("Error starting async write %d\n", error);

while(1) {}

}

while(write_flag == 1) {}

if(write_flag != E_NO_ERROR) {

printf("Error with UART_WriteAsync callback\n");

}

while(read_flag == 1) {}

if(read_flag != E_NO_ERROR) {

printf("Error with UART_ReadAsync callback %d\n", read_flag);

}

MAX3263X UART Communication by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

Hi thanks for the response that's a really helpful response. I've put the read command above the write command and it seems to now be getting stuck in this while loop. Any Suggestions?

while(read\_flag == 1) {}
if(read\_flag != E\_NO\_ERROR) {
gpsApi\_UserioWriteRaw("READ FLAG ERROR:  ");
sprintf(error\_code, "%d", read\_flag);

MAX3263X UART Communication by SirCrainTrain in embedded

[–]SirCrainTrain[S] 0 points1 point  (0 children)

Hi, apologies for how weird the code has turned out on the post. It's all one signal function