Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoftwareSerial hardware timer interrupt not being called? #919

Closed
lab-mathias-claussen opened this issue Feb 6, 2020 · 4 comments
Closed
Assignees

Comments

@lab-mathias-claussen
Copy link
Contributor

lab-mathias-claussen commented Feb 6, 2020

[Edit]: Problem fixed with current code from Git ( commit 1043594 )

STM32F072C8T6 / Elektor LoRa Node

Seems like #879 the interrupt for the hardware timer is not getting called. We can see that the IO Pins get configured ( PA2 and PA3 ) in this case.

To Reproduce:

Fit a STM32F072C8T6 on a bluepill and put the following code using version 1.8 of the core on the board:

/* Includes */
#include <hal/hal.h>
#include <SPI.h>
#include <Wire.h>

#include <SoftwareSerial.h>
#include <EEPROM.h>

SoftwareSerial SerialX(PA3, PA2); //RX, TX
/**************************************************************************************************

  • Function : print_array
  • Description : will print an array of data as hex
  • Input : uint8_t * data , uint32_t len
  • Output : none
  • Remarks : none
    **************************************************************************************************/
    void print_array(uint8_t * data , uint32_t len ){

for(uint32_t i=0;i<len;i++){
Serial.print("0x");
Serial.print(*data++);
Serial.print(" ");
}
Serial.println("");
}

void setup() {
Serial.begin(115200);
SerialX.begin(9600);
Serial.println("Boot");

}

void loop() {
SerialX.write(0xAA);
while(SerialX.available() ){
Serial.write(SerialX.read());
}
Serial.write(0x55);

}

What will be shown on USART 1 is:

Boot
U

And at that Point the code seems to stop at all
image

PA2 is TX and PA3 is RX for hardware serial output we use PA9 / PA10

Currently we try to investigate this further but stummbeled also accross some other issues that may lay down int the variant itself. The code works fine on a STM32F103 blue pill

@stas2z
Copy link
Contributor

stas2z commented Feb 6, 2020

#895

@fpistm
Copy link
Member

fpistm commented Feb 6, 2020

Hi @lab-mathias-claussen

You can check the issue provided by @stas2z

Anyway about this:

Fit a STM32F072C8T6 on a bluepill

What would you mean by this ? You replaced the STM32F103 by a STM32F072C8T6 ?
So this is a custom board?
Which variant you used in this case?

@lab-mathias-claussen
Copy link
Contributor Author

It uses the ELEKTOR_F072C8 variant, an we replaced the STM32F103 by a STM32F072C8T6. This is kind of a custom board for internal development to mimic the ELEKTOR_F072C8 variant.

image

@lab-mathias-claussen
Copy link
Contributor Author

Fixed with current code from Git repository
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants