Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Current »

IOC Configuration USART2

Basic Parameters

Don’t touch Advanced Parameters

Advanced Features

  • Enable TX/RX Inversion (SBUS is inverted UART signal)

DMA Configuration

NVIC Settings


Getting Code Running

Add these lines of your code to main.cpp.

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "SBUSReceiver.hpp"
#include "RCReceiver_config.hpp"
/* USER CODE END Includes */
/* USER CODE BEGIN 2 */
  SBus sbus_data;
  RCControl control_data;
  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */
  	sbus_data = sbus_pointer->GetSBUS();
  	control_data = sbus_pointer->GetRCControl();
  	/* USER CODE BEGIN 3 */
  }

Building and Flashing

  1. Build using CMAKE with the appropriate command. (Check READ.ME file for ZP3.5) Building inside STM32CubeIDE will give errors as it does not build the code using CMAKE.

  2. When flashing, go to debug configurations and change the C/C++ Application to point to ZeroPilot.elf

  3. Also, select the “Disable auto build” option.

Troubleshooting

If all the values do not change and have a value of 1000 even when you move the controller, your ioc is probably not configured correctly. Set a breakpoint in the callback function and make sure it is being hit. Otherwise, unplug and replug the tracer or use a different board for testing.

To Do

  • Configure Nucleo pins
  • Test data with a logic analyzer and RC controller
    • Debug with interrupts
    • Transmit receive signal to nucleo to check if the data is similar

Questions

Unit Testing Logic

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.