Quantcast
Channel: Processors forum - Recent Threads
Viewing all 17527 articles
Browse latest View live

Compiler/AM6546: PRU eCAP timer interrupts

$
0
0

Part Number: AM6546

Tool/software: TI C/C++ Compiler

I am running following  program by following example given here https://gist.github.com/shirriff/2a7cf2f1adb37011da827f1c7f47b992

Interrupts are not getting cleared once set , in highlighted area below.

Anyone worked on this before can please guide here.

#define DELAY_NS 500 // Use 500000000 for 0.5 second delay
#define WRITE_PIN 15 /* P8_11, Ethernet output data, pr1_PRU0_pru_r30_15 */

// PRU ECAP control registers (i.e. PWM used as a timer)
#define ECAP 0x00030000 // ECAP0 offset, TRM 4.3.1.2
// Using APWM mode (TRM 15.3.2.1) to get timer (TRM 15.3.3.5.1)
#define ECAP_TSCTR ((volatile uint32_t *)(ECAP + 0x00)) // 32-bit counter register, TRM 15.3.4.1.1
#define ECAP_APRD ((volatile uint32_t *)(ECAP + 0x10)) // Period shadow, TRM 15.3.4.1.5, aka CAP3
#define ECAP_ECCTL2 ((volatile uint32_t *)(ECAP + 0x2a)) // Control 2, TRM 15.3.4.1.8
#define ECAP_ECEINT ((volatile uint16_t *)(ECAP + 0x2c)) // Enable interrupt, TRM 15.3.4.1.9
#define ECAP_INTFLG ((volatile uint16_t *)(ECAP + 0x2E)) // Enable interrupt, TRM 15.3.4.1.9
#define ECAP_ECCLR ((volatile uint16_t *)(ECAP + 0x30)) // Clear flags, TRM 15.3.4.1.11

// Forward definitions
void init_pwm();
void wait_for_pwm_timer();


void main(void)
{
uint32_t *pDdr = (uint32_t *) &CT_DDR;

// Globally enable host interrupts
CT_INTC.GLOBAL_ENABLE_HINT_REG = 0x1;

/* Clear any pending PRU-generated events */
__R31 = 0x00000000;

/* Start preparing message for host - make sure it's not 0xB */
pDdr[1] = 0x0001;

/* Enable Host interrupt 2 */
CT_INTC.HINT_ENABLE_SET_INDEX_REG |= HOST_NUM;

/* Map channel 2 to host 2 */
CT_INTC.HINT_MAP_REG0_bit.HINT_MAP_2 = HOST_NUM;

/* Map PRU0_ARM_INTERRUPT (event 19) to channel 2 */
CT_INTC.CH_MAP_REG4_bit.CH_MAP_19 = CHAN_NUM;

/* Ensure PRU0_ARM_INTERRUPT is cleared */
CT_INTC.STATUS_CLR_INDEX_REG = (PRU0_ARM_INTERRUPT - 16);

/* Enable PRU0_ARM_INTERRUPT */
CT_INTC.ENABLE_SET_INDEX_REG = (PRU0_ARM_INTERRUPT - 16);

/* Ensure CT_DDR (C31) is pointing to start of DDR memory (0x80000000) */
PRU0_CTRL.CTPPR1_bit.C31_BLK_POINTER = 0x0;

/* Write value of 0xB which Host will read after receiving the interrupt */
// = 0xB;

volatile int16_t y = 0;
int16_t x = 0;
uint16_t i = 0;
uint16_t P = 20;
uint16_t m = 514;
init_pwm();
while(i <= 1024 )
{
y = m - abs(m - 2*(i++ % m));
wait_for_pwm_timer();
}
/* Halt PRU core */
__halt();
}

// Initializes the PWM timer, used to control output transitions.
// Every DELAY_NS nanoseconds, interrupt 15 will fire
inline void init_pwm() {
// *PRU_INTC_GER = 1; // Enable global interrupts :already enabled
*ECAP_ECCLR = 0xff; // Clear interrupt flags
*ECAP_APRD = DELAY_NS / 5 - 1; // Set the period in cycles of 5 ns
*ECAP_ECCTL2 = (1<<9) /* APWM */ | (1<<4) /* counting */;
*ECAP_TSCTR = 0; // Clear counter
*ECAP_ECEINT = 0xC0; // Enable compare equal interrupt
*ECAP_ECCLR = 0xff; // Clear interrupt flags;inconsistent behavior 

// Wait for the PWM timer to fire.
// see TRM 15.2.4.26
inline void wait_for_pwm_timer() {
// while (!(__R31 & (1 << 30))) {} // Wait for timer compare interrupt
<span style='background-color:#ffff00;'> while(!(*ECAP_INTFLG & 1)){};</span>
CT_INTC.STATUS_CLR_INDEX_REG = 15; // Clear interrupt
*ECAP_ECCLR = 0xff; // Clear interrupt flags 
}


AM5728: Assertion "A_regionInvalid: Region is invalid" when sending the same message second time from DSP to A15 using IPC and SharedRegion

$
0
0

Part Number: AM5728

Hi all,

I'm trying to test IPC using shared memory transport to exchange messages between A15 and DSP. I want to allocate message once on each core and then reuse it indefinitely.

Platform:

  • AM5729 on BeagleBorad-X15
  • pdk_am57xx_1_0_15
  • processor_sdk_rtos_am57xx_6_00_00_07
  • bios_6_75_02_00

Cache is enabled on A15, disabled on DSP.

  1. A15 and DSP: Create and open queues, one on A15 side, one on DSP side using MessageQ_create() and MessageQ_open().
  2. DSP: Allocate message1 (MessageQ_alloc()) and send it over through A15 queue (MessageQ_put()).
  3. A15: Receive message1 (MessageQ_get()), allocate message2 and send it to DSP (MessageQ_put()).
  4. DSP: Receive message2 and resend message1 to A15.
  5. A15 Assert A_regionInvalid: region is invalid (A15's stack address is supplied to SharedRegion_getPtr())

I've tried to narrow down the issue. When A15 receives message1 for the first time, I see that IPC uses SWi to dequeue the message from some "shared" queue located in shared region and enqueues message1 to "internal" queue located on A15's stack. So the message head is updated, BUT no Cache_inv() is called and the updated head is in the cache only. This fires back when the message1 is received on A15 for second time, SWi does Cache_inv() and old value from the cache overwrites the new value updated by DSP. Then it tries to translate shared region address to A15's address and assertion is raised.

When I change the approach that A15 doesn't allocate message2, but uses message1 to reply to DSP, everything is OK.

So my question is if this is expected behavior or there's missing Cache_inv() when message is enqueued into A15's queue? I thought that once message is dequeued, no-one owns it and can be re-used by any core.

Thanks!

AM6548: TI SDK customization process (PHY driver update)

$
0
0

Part Number: AM6548

TI SDK for the am65xx .

I need to update or replace a driver.

What steps do i need to take ( be as complete as possible) to update the driver ?

If I need to replace the driver completely - what do I have to do ? Rebuild the SDK ... ? Is it a yocto project ?

I am new at this so a detail answer would make me understand better!

 

AM3354: GPMC_CLK

$
0
0

Part Number: AM3354

According to am335x TRM, GPMC_CLK is from core-PLL(L3S_CLK), PD_PER_L3S_GCLK domain.

The clock can gated, inactive and so on.

I have a few simple questions,

1. was GPMC_CLK a continuous clock or only present when chip-select is LOW (or active)? 

2. any suggestions if could not see GPMC_CLK on the pin. 

- we are sure that this pin is selected MUX mode and RXACTIVE is set. 

TEST THREAD #1: POST WILL BE DELETED AFTERWARDS

$
0
0

TEST POST WILL BE DELETED AFTWARDS, NO NEED FOR RESPONSE.

TDA2P-ABZ: CSI 2 interface with AWR1243P

$
0
0

Part Number: TDA2P-ABZ

Dear TI Experts,

  Does TDA2P support CSI 2 interface?

  Or will other similar products  can support CSI 2?

TDA2PXEVM: ROI Support for GLBGE/Iridix

$
0
0

Part Number: TDA2PXEVM

Hello,

In the TI driver interface there is no GLBGE/Iridix Region of interest support. In the registry description there is a section about this, which is marked as TBD.
So the question is - is there ROI support in GLBCE?

Regards,
Todor

TMS320C6412: SWI_inc BIOS API usage

$
0
0

Part Number: TMS320C6412

Hi

I'm debugging legacy C6412 code that predominantly uses SWI's. 99% of the calls are SWI_post(), and there are a few SWI_or() calls. The version of RTOS is bios_5_31_02.

I'm changing a few SWI_post() calls to use SWI_inc() instead, and reading the mailbox (SWI_getmbox) inside the SWI object function to determine how many SWI interrupts are occurring. I'm making this change since I suspect that there is more than one SWI interrupt occurring when the problem occurs.

However, I can compile and link, and download onto target. The DSP loads and starts executing, but my application basically stops responding when it hits the first SWI_inc() call.

Note there is no issues if I use SWI_post() and SWI_getmbox in the SWI_object function - even though SWI_getmbox is of no use since SWI_post() doesnt modify the mbox. This is just extra info.

I have read and re-read the C6000 DSP/BIOS guides.

Is there anything subtle that I need to do to use SWI_inc() instead of SWI_post() ??

Could there be any issue because with SWI_inc we are treating the mailbox as a counter as opposed to a bit map (SWI_or) or not at all (SWI_post)?

Is there anything else I need to initialise before using SWI_inc, maybe in the tcf file?

Anything that needs initialised since I am using the mbox as a counter with SWI_inc()?

Just looking for ideas....

Thanks

Jim


BEAGLEBOARD-X15: From where to obtain Processor Linux SDK for Beagleboard-xM ?

$
0
0

Part Number: BEAGLEBOARD-X15

Note:  I need Linux sdk for Beagleboard-xM, not Beaglebaord-x15.

sdk is available at:  www.ti.com/.../LINUXEZSDK-SITARA

but there is following note:  

I went to this website for latest software but didn't find sdk for BeagleBoard-xM

From where do I obtain Linux Processor SDK for Beagleboard-xM ?  

Do I install this software in Linux Desktop PC or Windows Desktop PC ?

CCS/AM3358: Soft Uart

$
0
0

Part Number: AM3358

Tool/software: Code Composer Studio

Hi guys, do u have any news about SoftUart? We are working in a project that uses 8 uart, it would be great to be able to use PRU's 

TMS320C6678: DDR3 leveling: Can't read/write DDR3 at 666.7MHz

$
0
0

Part Number: TMS320C6678

Hello Champs,

Customer used Micron MT41K256M16HA-125IT 1600M.

When configuring 666.7Mhz in <DDR3 Register Calc v4.xlsx> and <DDR3 PHY Calc v11.xlsx>, the MT41K256M16HA runs at 666.7Mhz, too, but the DDR3 can't read/write correctly. 

But when configuring 800MHz in <DDR3 Register Calc v4.xlsx> and <DDR3 PHY Calc v11.xlsx>, the MT41K256M16HA runs at 666.7Mhz, the DDR3 can read/write correctly. 

Below is the parameters configured in DDR3 Register Calc v4.xlsx at 800MHz.



It is very curious. He also changed the parameters in DDR3 PHY Calc v11 according to his own pcb layout. He used fly by topology, DQS and CLK are differential signal.

Microstrip length (inches) Stripline length (inches) Delay (ps)
DQS0 0.000 1.336 223
CK_0 0.000 2.608 436
DQS1 0.000 1.205 201
CK_1 0.000 2.608 436
DQS2 0.000 1.171 196
CK_2 0.000 3.090 516
DQS3 0.000 1.094 183
CK_3 0.000 3.090 516
DQS4 (C665x DQS0) 0.000 1.252 209
CK_4 (C665x CK_0) 0.000 4.066 679
DQS5 (C665x DQS1) 0.000 1.159 194
CK_5 (C665x CK_1) 0.000 4.066 679
DQS6 (C665x DQS2) 0.000 1.391 232
CK_6 (C665x CK_2) 0.000 4.543 759
DQS7 (C665x DQS3) 0.000 1.385 231
CK_7 (C665x CK_3) 0.000 4.543 759
DQS_ECC 0.000 0.997 166
CK_ECC 0.000 3.574 597

Thanks.
Rgds
Shine

TDA2PXEVM: tidl import tool (tidl_model_import.out.exe) not works for mobilenetv2-ssd

$
0
0

Part Number: TDA2PXEVM

Hi,

I trained my mobilenetv2-ssd  on caffe-jacinto, and it works well. 

Then I convert caffe-jacinto model to TIDL model using eve_test_dl_algo.out.exe. And set tidlStatsTool = "eve_test_dl_algo.out_org.exe" in tidl_import.txt.

I get no results.

So, is there some thing wrong with my import tool or quantStats tool?

And where can I update tidlModelImpot Tool and quantStats Tool?

I offered my models and txts below. The zip contains models, prototxt, and test img.(Please visit the site to view this file)

AM3358: spl_load_image_fat_buf error Can't read partition table on 0:0 spl: no partition table found

$
0
0

Part Number: AM3358

Hi Champs,

Customer designed his own board by referencing BBB. He replaced emmc with nand flash on his board. The SD card circuit was the same to BBB.  He used a 2GB FAT32 SD card, MLO and u-boot.img are saved to the boot partition. But the ROM code could load the MLO, the MLO could not load uboot.

He migrated to the newer SDK: TI SDK am335x-evm-linux-sdk-src-05.03.00.07

Below is the log:

u-boot 2018.01 u-boot-2018.01+gitAUTOINC+313dcd69c2-g9d984f4548 

linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447

U-Boot SPL 2018.01-00569-g7b4e473842-dirty (Aug 13 2019 - 15:18:11)
Trying to boot from MMC1
spl_load_image_fat_buf: error reading image u-boot.img, err - -2
** Can't read partition table on 0:0 **
spl: no partition table found
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

But when he used the old version SDK's (linux-3.14.26 and u-boot-2011.09) MLO and u-boot.img, it could boot successfully. 

1. "Trying to boot from MMC1", does it mean it boots from mmc1? But there is no mmc1 on his board and he didn't configure the sysboot pin to support mmc1 boot mode, the boot mode sequence is 00100  UART0 >>XIP>>MMC0 >>NAND (There is no data in nand flash)

2. How to disable MMC Card Detect pin and Write Protect pin in MLO?

3. How to resolve the "spl_load_image_fat_buf: error reading image u-boot.img, err - -2" error?

Thanks
Rgds
Shine

[DRA829] single TPS65941 can support.

$
0
0

Hello Support team.

I understood that needed PMICs is depending on usecase.
DRA829J has separete power lines for MCU and Main block.
I want to double check if only TPS65941-Q1 can support for DRA829J (both MCU and Main) for low power usecase.

Best Regards

KORO

[DRA829] Reference guide for designing SOC and PMIC

$
0
0

Hello Support team.

DRA829J can be supported TPS65941-Q1 or TPD65941-Q1/LP8762.

I would like to know if TI plans to release reference design guide for schematic of DRA829 and PMIC.

Best Regards

KORO


CCS/TMS320DM6467T: Problem with emulator connection to DSP core in ccsv8

$
0
0

Part Number: TMS320DM6467T

Tool/software: Code Composer Studio

Hi everyone

I'm newbie in c6000 and davinci series processors. I'm working on a custom designed DM6467T Board. 

I'm trying run some not linux based program on it. some examples codes, source and header file are available on the Spectrum Digital site for ccsv3.3

After converting project to ccsv8 based project, ARM core is working well but DSP core can not connect and dialog box says target  is held at reset.(while target is not in reset )

within gel files is noted that this gel file is written for ccsv3.3. I dont know how to rewrite them for ccsv8.

I'm looking for solution or other example codes that can help.

[DRA829] SOM Schematic has "NFM15HC105D0G" and "NFM18HC106D0G"

$
0
0

Hello Support team.

We are checking J7 SOM schematic with customer.

Then this schematic has "NFM15HC105D0G" and "NFM18HC106D0G".

Then we are looking for these part number at Web.

However, we could not find any site.

I would like to know if customer can contact about "NFM15HC105D0G" and "NFM18HC106D0G" to Vendor company directly ?

Best Regards

KORO

AM3359: RGMII direct connection

$
0
0

Part Number: AM3359

Hi TI engineers

In my design ,there are two AM3359 chips, Whether I can connect the RGMII ports derictly between the two chips, just like the following figure describes

Whether this design will have some risk ?

Thank you.

Regards.

Gavin

AM5728: PCIe clock requirements

$
0
0

Part Number: AM5728

Could you provide me with the PCIe Gen 1/ Gen 2 Clock Requirement for the AM57x (ex, V_CM, Jitter, etc) ?

  • Reviewed PCIE Base Specification Revision 2.0; however, I could not find the clock requirement.
  • Looking for confirmation that on AM57x side is okay no termination/AC caps at LJCB_REFN/P for LP-HCSL ? Since the reference schematic has LVDS output format which has AC caps and 100-ohm termination.

 Requesting confirmation whether there is register configuration to identify the output clock mode either LVDS or LP-HCSL ?

 

[DRA829] MCU_SAFETY_ERRORn

$
0
0

Hello Support team.

I would like to know how "MCU_SAFETY_ERRORn" pin will be used.

I would like to get your advise.

So, I would like to know how TI expects to use this MCU_SAFETY_ERRORn" pin.

Best Regards

KORO

Viewing all 17527 articles
Browse latest View live


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