Quantcast
Channel: Microcontrollers
Viewing all 217147 articles
Browse latest View live

Forum Post: TMS570LC4357: LIN1/SCI1 Idle Line Interrupt

$
0
0
Part Number: TMS570LC4357 Tool/software: I would like to ask if it is possible to generate an idle line interrupt after reception of a packet of data on the LIN1/SC1 module? I saw that I can use SET TIMEOUT INT bit in SCI Set Interrupt Register (SCISETINT) but the 4 seconds it takes to trigger the interrupt is too long.

Forum Post: RE: LAUNCHXL-F28379D: Issue with I2C Communication: F28379D as Slave

$
0
0
Hi TingHsuan, Apologies for the delay. Could you confirm if the C2000 target is only in receiver mode or also transmitter? You'll need the ' I2C_setOwnAddress ' function to set the own address for the I2C target. It's is compared against the target address sent by an I2C controller. I believe that l ine 290 is unnecessary if I2CB is only acting as the target as per your above comments. The example configures I2CA and I2CB as controller because there are four combinations of I2C operations happening. In addition, if you are communicating with a temp sensor, you could also use any of the EEPROM examples as a basis instead too. Best Regards, Aishwarya

Forum Post: RE: MCU-PLUS-SDK-AM243X: Fails 60-80% when writing HS-SE conversion key writer via usb_dfu_uniflash.py other flash writers work consistently.

$
0
0
Hello Prashant, Thanks for the help to understand the questions here. From what I understand, UART has FIFO size of 64 bytes for both TX and RX. I don't understand why DebugP_scanf cannot handle receiving character and echo it back fast enough for only 10+ characters. I did try to increase the rxTriggerLevel to see whether it makes difference, but I didn't have luck here. In our use case, we don't use copy-paste, but we have python script to handle sending characters of START_PROGRAM_KEY. This failed the same way as the copy-paste example you have as above on EVM board. I also have the above questions regarding FIFO_EN setting in SDK's uart_v0.c, which seems to be conflict with TRM's recommendation for UART polling mode. I believe, with a proper setting, AM243x with a 800 MHz MCU clock frequency should be able to handle receiving and echoing a character back properly at UART clock of 115k; unless there is something else that we have not understood about. Thanks, Hong

Forum Post: RE: MSPM0L1306: mspm0l1306

$
0
0
Theia has been folded into CCS: https://www.ti.com/tool/CCSTUDIO#downloads The newest version is 20 and change

Forum Post: TMS320F280049C: Code to spin a BLDC motor using C2000 & DRV816x

$
0
0
Part Number: TMS320F280049C Other Parts Discussed in Thread: LAUNCHXL-F280049C , DRV8161EVM , DRV8161 Tool/software: Hello, I am using the LAUNCHXL-F280049C with the 100 pin F280049CPZS. I am trying to get a BLDC motor to spin using the launchpad and 3x DRV816x motor drivers. I have built a PCB that is similar to the DRV816x EVM and have jumped the following signals from the launchpad to the motor driver board. The motor driver board takes PVDD (24V 1A), GVDD (12V 1A), 5Vin (5V 1A), as well as 3.3V from the launchpad. MCU Pin Number MCU Signal (GPIO / ADC / Power) Motor Driver Signal 1 3.3V 3.3V (Logic Power) 2 PGA1/3/5_GND CSAREF_C 4 GPIO40 HALL_C 6 ADCINB3/VDAC CSAREF_B 8 ADCIN4 CSAREF_C 11 GPIO59 nFAULT_C 12 GPIO23 nFAULT_B 13 GPIO39 nFAULT_A 22 GND GND 23 ADCINA5 VSEN_A 24 ADCINB0 VSEN_B 25 ADCINC2 VSEN_C 26 ADCINB1 SEN_PVDD 27 ADCINB2 ISEN_C 28 ADCINC0 ISEN_B 29 ADCINA9 ISEN_A 30 ADCINA1 CSAREF_A 33 GPIO30 HALL_B 34 GPIO58 HALL_A 35 GPIO5 INL_C (PWM3B) 36 GPIO4 INH_C (PWM3A) 37 GPIO9 INL_B (PWM5B) 38 GPIO8 INH_B (PWM5A) 39 GPIO11 INL_A (PWM6B) 40 GPIO10 INH_A (PWM6A) Using the launchpad and motor driver board I have been able to get this motor to spin using the DRV8161EVM GUI ( https://dev.ti.com/gallery/view/InternalBLDC/DRV8161-EVM-GUI/ver/0.1.4/ ). However, now I am trying to build a program within CCS to flash onto the C2000 that will give me motor motion without the use of the GUI. Simply, I just want to spin the motor after compiling on CCS. Is there some code available or could I get some assistance in writing a simple program on CCS to perform this task. I have already looked at the DRV8161_Sensored_Trapizoidal_GUI.c and DRV8161_Sensored_Trapizoidal_6x_PWM.c for help. These programs are complex and I have had no progress trying to replicate them. This is what my setup looks like. Launchpad (red), PCB board with 3x motor driver (green), Teknic motor ( https://teknic.com/hudson-model/M-2311P-QN-08D/ ) This is some code I have written for the launchpad that was flashed on CCS: #include "driverlib.h" #include "device.h" // // Constants // #define SYSCLK 100000000UL // 100 MHz system clock #define PWM_FREQ 20000UL // 20 kHz PWM frequency #define TBPRD (SYSCLK / (PWM_FREQ * 2)) // Timer period for up-down counter // // Pin definitions // #define PWM6A_GPIO 10 // GPIO10 (Pin 40) #define PWM6B_GPIO 11 // GPIO11 (Pin 39) #define PWM5A_GPIO 8 // GPIO8 (Pin 38) #define PWM5B_GPIO 9 // GPIO9 (Pin 37) #define PWM3A_GPIO 4 // GPIO4 (Pin 36) #define PWM3B_GPIO 5 // GPIO5 (Pin 35) // // Function Prototypes // void initEPWMModules(void); void initGPIOPins(void); void setDutyCycle(uint16_t epwmBase, uint16_t dutyPercent); void main(void) { // // Initialize the device and GPIO // Device_init(); Device_initGPIO(); // // Initialize GPIO pins for PWM // initGPIOPins(); // // Initialize ePWM modules // initEPWMModules(); // // Main loop: adjust duty cycle to 3% for all phases // while (1) { setDutyCycle(EPWM6_BASE, 3); // Phase A setDutyCycle(EPWM5_BASE, 3); // Phase B setDutyCycle(EPWM3_BASE, 3); // Phase C DEVICE_DELAY_US(1000000); // 1 second delay } } // // Configure GPIO pins for PWM outputs // void initGPIOPins(void) { EALLOW; // Configure GPIO for PWM outputs GPIO_setPinConfig(GPIO_10_EPWM6A); // PWM6A GPIO_setPinConfig(GPIO_11_EPWM6B); // PWM6B GPIO_setPinConfig(GPIO_8_EPWM5A); // PWM5A GPIO_setPinConfig(GPIO_9_EPWM5B); // PWM5B GPIO_setPinConfig(GPIO_4_EPWM3A); // PWM3A GPIO_setPinConfig(GPIO_5_EPWM3B); // PWM3B EDIS; } // // Initialize ePWM modules for complementary outputs // void initEPWMModules(void) { // // Configure ePWM6 (Phase A) // EPWM_setTimeBasePeriod(EPWM6_BASE, TBPRD); EPWM_setTimeBaseCounterMode(EPWM6_BASE, EPWM_COUNTER_MODE_UP_DOWN); EPWM_setClockPrescaler(EPWM6_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1); EPWM_setActionQualifierAction(EPWM6_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(EPWM6_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA); EPWM_setActionQualifierAction(EPWM6_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(EPWM6_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA); // // Configure ePWM5 (Phase B) // EPWM_setTimeBasePeriod(EPWM5_BASE, TBPRD); EPWM_setTimeBaseCounterMode(EPWM5_BASE, EPWM_COUNTER_MODE_UP_DOWN); EPWM_setClockPrescaler(EPWM5_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1); EPWM_setActionQualifierAction(EPWM5_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(EPWM5_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA); EPWM_setActionQualifierAction(EPWM5_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(EPWM5_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA); // // Configure ePWM3 (Phase C) // EPWM_setTimeBasePeriod(EPWM3_BASE, TBPRD); EPWM_setTimeBaseCounterMode(EPWM3_BASE, EPWM_COUNTER_MODE_UP_DOWN); EPWM_setClockPrescaler(EPWM3_BASE, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_1); EPWM_setActionQualifierAction(EPWM3_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(EPWM3_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA); EPWM_setActionQualifierAction(EPWM3_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO); EPWM_setActionQualifierAction(EPWM3_BASE, EPWM_AQ_OUTPUT_B, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA); } // // Set the duty cycle for the ePWM module // void setDutyCycle(uint16_t epwmBase, uint16_t dutyPercent) { uint16_t compareValue = (TBPRD * dutyPercent) / 100; EPWM_setCounterCompareValue(epwmBase, EPWM_COUNTER_COMPARE_A, compareValue); EPWM_setCounterCompareValue(epwmBase, EPWM_COUNTER_COMPARE_B, compareValue); } /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// When this code is ran on CCS, these are the resulting waveforms for PWM6A, PWM6B as well as the power pulled from the different supplies. If I let this ccs code run longer, the mosfets begin to heat up but w hen GUI code is ran, the 24V supplies pulls around 0.3A. EPWM6A waveform EPWM6B waveform For reference, this is how the waveforms look when using the DRV816 EVM, the waveform also toggles on and off. PWM6A PWM6B Thank you.

Forum Post: RE: MSPM0G3507: Changing HEX File Format Byte Count to 0x10

$
0
0
Hi Pengfei, Thank you very much for your assistance. The main reason I want to do this is to merge three hex files, but the byte counts of each hex file are different. Therefore, I would like to ask if TI provides or recommends any tools for merging hex files? Best Regards, David

Forum Post: RE: MSP-GANG: Is there a facility to check software such as SUM codes?

$
0
0
Hi All, My customer only check the "image CRC" in the picture above. We do not check it against our own system. The "image CRC" varies between different versions of the application, despite the SW to be written being the same. Best Regards, Ito

Forum Post: RE: MCU-PLUS-SDK-AM243X: SPI DMA fail when transfer large size

$
0
0
Hi Anil, Any update? Expect the issue to be confirm soon. The polled/interrupt mode is currently satisfactory and we're also doing a 2048 bytes dma stress test.

Forum Post: RE: MSPM0L1306: How do I obtain the correct bin file?

$
0
0
Hi Dennis, I have not tried it on CCS.

Forum Post: RE: TMS320F2800135: How to pre-program the APP function in flash

$
0
0
Hi Rajeshwary Could you please kindly update this thread? Thanks Joe

Forum Post: UNIFLASH: Error initializing emulator

$
0
0
Part Number: UNIFLASH Other Parts Discussed in Thread: UCD3138 , Tool/software: I encountered the following error while trying to download my program from my UCD3138 chip using Uniflash software. Could you please advise on how to resolve this issue。

Forum Post: RE: MSPM0G3507: A high-frequency sound is heard while the motor is running.

$
0
0
Hi Sal, That's right. The product that used the MCU of another company that was in use also uses 1 shunt 1mΩ and operates at the same 20kHz. B.R. Donguk

Forum Post: RE: TMS320F2800137: Universal Motor Control Project & Lab for linear motor

$
0
0
Yanming, Thanks for your help. Regards, Kien Nguyen

Forum Post: RE: MSPM0G3507: LIN communication is disconnected midway.

$
0
0
Hi Luke, Timer interrupt is the highest priority and LIN, ADC use default I put the timer interrupt above Lin's priority because the timer interrupt is interrupted by Lin. Regrads, Donguk

Forum Post: RE: MCU-PLUS-SDK-AM243X: MULTI GPIOs interrupt initinal failed

$
0
0
Update: When used two same bank gpios interrupt, I found only need enable one of the "Enable Interrupt Configuration". The issue fixed, and I suggest that restrictions should be automatically imposed on sysconfig.

Forum Post: RE: MCU-PLUS-SDK-AM243X: MULTI GPIOs interrupt initinal failed

$
0
0
Hi Tushar, How do you think about the above suggestion to impose automatic restriction in sysconfig when configure multiple interrupt pin in same bank, to avoid mistake. For example, when configured one pin, then gray the option under other pin.

Forum Post: RE: TMS320F28375D: TMS320F28375D: SCI BOOT Mode (FMSTAT Register contents:01010)

$
0
0
Alex, Sorry to have kept you waiting. I had accomplished the two things mentioned above. First, Load a different application to the same memory region, it was failed. Second, i debug the kernel over JTAG but not insert statement above, amd load blinky_dc_cpu01.txt, it was also failed and error address was also 0x82A38. inspect the memory, i thought erased ok and written failed. The screenshot is as follows. Then, i reset the kernel project from "C2000WARE_ROOT\device_support\f2837xd\examples\dual\F2837xD_sci_flash_kernels\cpu01", Something magical happened. Whether debug the simulation kernel or use "serial_flash_programmer.exe" , and had tried three different apps, the burning process was successful. the error can no longer be reproduced. I'm very worried,this error had occurred in different batches of boards. So how can I prevent this problem from happening? Best, Xiao

Forum Post: RE: F29H85X-SOM-EVM: INT type interrupt triggers exception.

$
0
0
Zihao, Were you able to resolve the issue? If there are no other questions, I will go ahead and close this thread. Best Regards, Aishwarya

Forum Post: RE: TMS320F28388D: why are we selecting the slowest possible MDIO clock in the Ethernet example ?

$
0
0
I have not yet received a response. Could you please provide an update on the status of my queries? If any further information is needed from my side, I would be happy to provide it. Thank you for your attention to this matter. I look forward to your prompt response. Best regards, Aditya

Forum Post: RE: LP-AM243: How to write XIP image to Flash in SBL processing?

$
0
0
Hello Prashant, Thank you. After reading this guide, I checked the linker command file (linker.cmd) and it was as intended, so there seems to be no problem with the XIP binary I created. However, as I mentioned earlier, when I write the serial received XIP file (.appimage_xip) to Flash, it does not work. Here, the guide has the following sentence The file containing XIP sections is additionally flashed to the flash using the special flash-xip command passed to the flash writer I think I could write to Flash in the same way as the flash writer (probably uart_uniflash.py) in the statement, but I don't know how to write it in code. Is this idea correct? Also, if it is correct, please tell me if there is any code to write XIP files to the Flash. Regards, TAKEDA Taro
Viewing all 217147 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>