I plan to use STM32F767ZI USART port in synchronous mode and control DAC (DAC082S085) for generating two Analog Signals. I also want to control the amplitude of these analog signals. So, how can I do in CubeMx and Keil?
Thank you
Related
I am working on a software for testing serial channels on my setup running on Linux OS. To configure channel settings such as BAUD rate, parity, etc., I used functions in <termios.h>. However, I do not know how to change channel mode from RS-232 to RS-422 mode.
I tried to use functions in <termios.h> and some ioctl commmands.
What are the possible ways of setting custom baud rates for serial ports in Linux user mode and kernel mode?
I see TCGETS2/TCSETS2 ioctl calls to achieve this. Is it possible to set custom baud rates without any special ioctls?
I am very new to C and embedded programming.
I simply want to have my main thread wait until a usb device has been plugged in to my embedded device.
However, no matter how hard I look, I cant find documentation or examples about how to check if the usb has been plugged in.
I am using a ATSAM4S8B.
EDIT:
Actually I think the usb capabilities are built into the chip, I can use Atmel ASF libraries.
I am hoping that there is just a library function I can call to see if the usb has been connected too but I can't find anything like it.
There are two ways of detecting USB connection:
waiting for usb events occure and special USB flags to fire in hardware registers, which will signal if initiating process started. This solution depends on a particular chip you use and firmware burnt into MCU.
use sense IO pin. Attach USB 5V through 1k resistor to a pin of the MCU. High level on the pin will indicate, that USB was connected. Dont forget to use high value (>10k) pull-down resistor, which will pull the input low when USB disconnected.
How can i know that my architecture support interrupts? If it supports then how can we implement a interrupt on some gpio pin? In my case some other board is sending interrupt on a gpio pin. can I detect this interrupt in u-boot level and process it in handler? i am using arm architecture.
Short answer, interrupts are not really used in U-Boot.
Ref1 Normally you don't need interrupts in U-Boot. U-Boot is strictly
single-tasking by nature and design.
Ref2 All the peripherals are implemented in polled mode.
Ref3 U-boot is polling by design (simplicity).
More good info here Enabling Interrupts in U-boot for ARM cortex A-9
On the Arduino Nano V3, I am trying to get an LED driver (TLC5960) and two analog to digital (ADC) converters (MCP3208) to work together. The LED driver is on the same pins as this guide. The ADCs are assigned to different pins than the LED driver. I found that the LED driver conflicts with the SPI communication interface according to the comment:
Tlc.init(); //interferes with other SPI
but I'm not sure what to do about it since if this is not called, the LED driver does not work. It seems to be true, however, since if I comment out all of the LED driver related lines in my code, the ADCs work.
Also, I am using bit banging to communicate to the MCP3208.
If you look at the code, you'll see that tlc_config.h contains options relating to the communication and connection with the TLC'. Simply edit the options within that file to suit your needs.