Skip to main content
added 13 characters in body
Source Link
Majdgh
  • 43
  • 1
  • 6

i am having an issue using STM32G4 with I2C DMS and FreeRTOS.
I have used the library https://github.com/firebull/STM32-LCD-HD44780-I2C for a long time with STM32F4 and free RTOS and it works perfectly.
Now I wanted to use it with STM32G4 but the Problem is:

  1. The SCL line stays low when calling:
    HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it only sends the first byte instead of 3
  2. The program get stuck in:
    while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

The hardware doesn’t have any problem because I can print text without DMA using blocking mode with another driver.

I have used USB Scope to inspect the problem and tried a lot of things like resetting I2C with I2C busy flag strange behaviour or reducing the speed but nothing worked.

I have used the same configurations that worked on STM32F4 with STM32G4 in CubeMX but HAL_I2C_Master_Transmit_DMA is not sending the other bytes and the bus is held

Can someone help me please? Thanks.

update 1: I changed the 3 functions to transmit in the library from DMA to blocking mode and it works but not with DMA.

i am having an issue using STM32G4 with I2C DMS and FreeRTOS.
I have used the library https://github.com/firebull/STM32-LCD-HD44780-I2C for a long time with STM32F4 and free RTOS and it works perfectly.
Now I wanted to use it with STM32G4 but the Problem is:

  1. The SCL line stays low when calling:
    HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it only sends the first byte instead of 3
  2. The program get stuck in:
    while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

The hardware doesn’t have any problem because I can print text without DMA using blocking mode with another driver.

I have used USB Scope to inspect the problem and tried a lot of things like resetting I2C with I2C busy flag strange behaviour or reducing the speed but nothing worked.

I have used the same configurations that worked on STM32F4 with STM32G4 in CubeMX but HAL_I2C_Master_Transmit_DMA is not sending the other bytes and the bus is held

Can someone help me please? Thanks.

update 1: I changed the 3 functions to transmit in the library from DMA to blocking mode but not with DMA.

i am having an issue using STM32G4 with I2C DMS and FreeRTOS.
I have used the library https://github.com/firebull/STM32-LCD-HD44780-I2C for a long time with STM32F4 and free RTOS and it works perfectly.
Now I wanted to use it with STM32G4 but the Problem is:

  1. The SCL line stays low when calling:
    HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it only sends the first byte instead of 3
  2. The program get stuck in:
    while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

The hardware doesn’t have any problem because I can print text without DMA using blocking mode with another driver.

I have used USB Scope to inspect the problem and tried a lot of things like resetting I2C with I2C busy flag strange behaviour or reducing the speed but nothing worked.

I have used the same configurations that worked on STM32F4 with STM32G4 in CubeMX but HAL_I2C_Master_Transmit_DMA is not sending the other bytes and the bus is held

Can someone help me please? Thanks.

update 1: I changed the 3 functions to transmit in the library from DMA to blocking mode and it works but not with DMA.

deleted 14 characters in body
Source Link
brhans
  • 14.8k
  • 3
  • 36
  • 51

i am having an issue using STM32G4 with I2C DMS and FreeRTOS. 
I have used the library https://github.com/firebull/STM32-LCD-HD44780-I2C for a long time with STM32F4 and free RTOS and it works perfectly. 
Now I wanted to use it with STM32G4 but the Problem is: 1- The SCL line stays low when calling HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it does send only the first byte instead of 3 2- The program stucks in : while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

  1. The SCL line stays low when calling:
    HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it only sends the first byte instead of 3
  2. The program get stuck in:
    while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

The hardware doesn’t have any problem because I can print text without DMA using blocking mode with another driver.

I have used USB Scope to inspect the problem and tried a lot of things like resetting I2C with I2C busy flag strange behaviour or reducing the speed but nothing worked.

I have used the same configurations that worked on STM32F4 with STM32G4 in CubeMX but HAL_I2C_Master_Transmit_DMA is not sending the other bytes and the bus is held

Can someone help me please? Thanks.

update 1: iI changed the 3 functions to transmit in the library from DMA to blocking mode but not with DMA.

i am having an issue using STM32G4 with I2C DMS and FreeRTOS. I have used the library https://github.com/firebull/STM32-LCD-HD44780-I2C for a long time with STM32F4 and free RTOS and it works perfectly. Now I wanted to use it with STM32G4 but the Problem is: 1- The SCL line stays low when calling HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it does send only the first byte instead of 3 2- The program stucks in : while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

The hardware doesn’t have any problem because I can print text without DMA using blocking mode with another driver.

I have used USB Scope to inspect the problem and tried a lot of things like resetting I2C with I2C busy flag strange behaviour or reducing the speed but nothing worked.

I have used the same configurations that worked on STM32F4 with STM32G4 in CubeMX but HAL_I2C_Master_Transmit_DMA is not sending the other bytes and the bus is held

Can someone help me please? Thanks.

update 1: i changed the 3 functions to transmit in the library from DMA to blocking mode but not with DMA.

i am having an issue using STM32G4 with I2C DMS and FreeRTOS. 
I have used the library https://github.com/firebull/STM32-LCD-HD44780-I2C for a long time with STM32F4 and free RTOS and it works perfectly. 
Now I wanted to use it with STM32G4 but the Problem is:

  1. The SCL line stays low when calling:
    HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it only sends the first byte instead of 3
  2. The program get stuck in:
    while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

The hardware doesn’t have any problem because I can print text without DMA using blocking mode with another driver.

I have used USB Scope to inspect the problem and tried a lot of things like resetting I2C with I2C busy flag strange behaviour or reducing the speed but nothing worked.

I have used the same configurations that worked on STM32F4 with STM32G4 in CubeMX but HAL_I2C_Master_Transmit_DMA is not sending the other bytes and the bus is held

Can someone help me please? Thanks.

update 1: I changed the 3 functions to transmit in the library from DMA to blocking mode but not with DMA.

added 148 characters in body
Source Link
Majdgh
  • 43
  • 1
  • 6

i am having an issue using STM32G4 with I2C DMS and FreeRTOS. I have used the library https://github.com/firebull/STM32-LCD-HD44780-I2C for a long time with STM32F4 and free RTOS and it works perfectly. Now I wanted to use it with STM32G4 but the Problem is: 1- The SCL line stays low when calling HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it does send only the first byte instead of 3 2- The program stucks in : while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

The hardware doesn’t have any problem because I can print text without DMA using blocking mode with another driver.

I have used USB Scope to inspect the problem and tried a lot of things like resetting I2C with I2C busy flag strange behaviour or reducing the speed but nothing worked.

I have used the same configurations that worked on STM32F4 with STM32G4 in CubeMX but HAL_I2C_Master_Transmit_DMA is not sending the other bytes and the bus is held

Can someone help me please? Thanks.

update 1: i changed the 3 functions to transmit in the library from DMA to blocking mode but not with DMA.

i am having an issue using STM32G4 with I2C DMS and FreeRTOS. I have used the library https://github.com/firebull/STM32-LCD-HD44780-I2C for a long time with STM32F4 and free RTOS and it works perfectly. Now I wanted to use it with STM32G4 but the Problem is: 1- The SCL line stays low when calling HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it does send only the first byte instead of 3 2- The program stucks in : while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

The hardware doesn’t have any problem because I can print text without DMA using blocking mode with another driver.

I have used USB Scope to inspect the problem and tried a lot of things like resetting I2C with I2C busy flag strange behaviour or reducing the speed but nothing worked.

I have used the same configurations that worked on STM32F4 with STM32G4 in CubeMX but HAL_I2C_Master_Transmit_DMA is not sending the other bytes and the bus is held

Can someone help me please? Thanks

i am having an issue using STM32G4 with I2C DMS and FreeRTOS. I have used the library https://github.com/firebull/STM32-LCD-HD44780-I2C for a long time with STM32F4 and free RTOS and it works perfectly. Now I wanted to use it with STM32G4 but the Problem is: 1- The SCL line stays low when calling HAL_I2C_Master_Transmit_DMA(lcdParams.hi2c, lcdParams.address, (uint8_t*)lcdCommandBuffer, 3) and it does send only the first byte instead of 3 2- The program stucks in : while (HAL_I2C_GetState(lcdParams.hi2c) != HAL_I2C_STATE_READY) { vTaskDelay(1); }

The hardware doesn’t have any problem because I can print text without DMA using blocking mode with another driver.

I have used USB Scope to inspect the problem and tried a lot of things like resetting I2C with I2C busy flag strange behaviour or reducing the speed but nothing worked.

I have used the same configurations that worked on STM32F4 with STM32G4 in CubeMX but HAL_I2C_Master_Transmit_DMA is not sending the other bytes and the bus is held

Can someone help me please? Thanks.

update 1: i changed the 3 functions to transmit in the library from DMA to blocking mode but not with DMA.

Source Link
Majdgh
  • 43
  • 1
  • 6
Loading