repro on f4.
This commit is contained in:
		| @@ -3,7 +3,7 @@ build-std = ["core"] | |||||||
| build-std-features = ["panic_immediate_abort"] | build-std-features = ["panic_immediate_abort"] | ||||||
|  |  | ||||||
| [target.'cfg(all(target_arch = "arm", target_os = "none"))'] | [target.'cfg(all(target_arch = "arm", target_os = "none"))'] | ||||||
| runner = "teleprobe client run --target bluepill-stm32f103c8 --elf" | runner = "teleprobe client run --target nucleo-stm32f429zi --elf" | ||||||
| #runner = "teleprobe local run --chip STM32F103C8 --elf" | #runner = "teleprobe local run --chip STM32F103C8 --elf" | ||||||
|  |  | ||||||
| rustflags = [ | rustflags = [ | ||||||
|   | |||||||
| @@ -9,7 +9,11 @@ fn main() -> Result<(), Box<dyn Error>> { | |||||||
|     println!("cargo:rustc-link-arg-bins=--nmagic"); |     println!("cargo:rustc-link-arg-bins=--nmagic"); | ||||||
|  |  | ||||||
|     // too little RAM to run from RAM. |     // too little RAM to run from RAM. | ||||||
|     if cfg!(any(feature = "stm32f103c8", feature = "stm32c031c6")) { |     if cfg!(any( | ||||||
|  |         feature = "stm32f429zi", | ||||||
|  |         feature = "stm32f103c8", | ||||||
|  |         feature = "stm32c031c6" | ||||||
|  |     )) { | ||||||
|         println!("cargo:rustc-link-arg-bins=-Tlink.x"); |         println!("cargo:rustc-link-arg-bins=-Tlink.x"); | ||||||
|         println!("cargo:rerun-if-changed=link.x"); |         println!("cargo:rerun-if-changed=link.x"); | ||||||
|     } else { |     } else { | ||||||
|   | |||||||
| @@ -127,7 +127,7 @@ async fn main(spawner: Spawner) { | |||||||
|     let mut config = Config::default(); |     let mut config = Config::default(); | ||||||
|     // this is the fastest we can go without tuning RCC |     // this is the fastest we can go without tuning RCC | ||||||
|     // some chips have default pclk=8mhz, and uart can run at max pclk/16 |     // some chips have default pclk=8mhz, and uart can run at max pclk/16 | ||||||
|     config.baudrate = 500_000; |     config.baudrate = 1_000_000; | ||||||
|     config.data_bits = DataBits::DataBits8; |     config.data_bits = DataBits::DataBits8; | ||||||
|     config.stop_bits = StopBits::STOP1; |     config.stop_bits = StopBits::STOP1; | ||||||
|     config.parity = Parity::ParityNone; |     config.parity = Parity::ParityNone; | ||||||
| @@ -164,7 +164,7 @@ async fn transmit_task(mut tx: UartTx<'static, board::Uart, board::TxDma>) { | |||||||
|         tx.write(&buf[..len]).await.unwrap(); |         tx.write(&buf[..len]).await.unwrap(); | ||||||
|         info!("sent {=usize}", len); |         info!("sent {=usize}", len); | ||||||
|  |  | ||||||
|         Timer::after(Duration::from_micros((rng.next_u32() % 1000) as _)).await; |         Timer::after(Duration::from_micros((rng.next_u32() % 500) as _)).await; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -193,12 +193,12 @@ async fn receive_task(mut rx: RingBufferedUartRx<'static, board::Uart, board::Rx | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         if received < max_len { |         if received < max_len { | ||||||
|             Timer::after(Duration::from_micros((rng.next_u32() % 1000) as _)).await; |             Timer::after(Duration::from_micros((rng.next_u32() % 500) as _)).await; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         i += received; |         i += received; | ||||||
|  |  | ||||||
|         if i > 100000 { |         if i > 1000000 { | ||||||
|             info!("Test OK!"); |             info!("Test OK!"); | ||||||
|             cortex_m::asm::bkpt(); |             cortex_m::asm::bkpt(); | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user