This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM437x IDK and BiSS encoder



Hello,

I am trying to communicate with BiSS encoder with AM437x IDK by following "BiSS-C Interface Master Design Guide(TIDU794A)".

TIDU794A instructed to remove R427, but it is not installed and it seems that R423 should be removed instead.
So I have modified hardware as following,
Removed R428, R423, R514,
Mounted 0 ohm for R422,
Connected U11-N24 to U57 pin1.

As pin multiplexing, I did following by CortexA9 program,
mcasp0_aclkx is set to mode 6
mcasp0_fsx is set to mode 5
and endat_en is set to mode 7 (probably not required as the same as the default value).
I confirmed the configuration above by CONTROL_MODULE registers.

I loaded PRU BiSS-C firmware by A9 and it seems to be fine as disassembled code of PRU_ICSS0_PRU0 seems to be the same as pru0_BiSS.p.

Then I Configured parameter in shared memory by A9 as following,
Data length is set to 12,
Crc bits is set to 8,
Frequency is set to 1.
It can be read in Memory browser address 0 of PRU_ICSS0_PRU0.

Then I ran the PRU program, but it halts at address 0xA0 with error flags 0x28 in shared memory.
No clock was sent and output of pin 31 in J16 always stayed high level.

Is there any other thing to do?

Regards

  • The ISDK team have been notified. They will respond there. Please note that response may be delayed due to holidays in the USA.
  • Hi Yuji, a quick question did you use Gel file from www.ti.com/.../tidc920. On the other hand, you would need to check why the clock does not come out. If pinmux is good (i.e. control module) then you can try to use R30 register of PRU and toggle the bit that is used for the clock. The clock is generated via R30 register (GPO) so any change in the bit of R30 should reflect in the output directly. This test can be done via CCS debugger view.

    Also, for your information, this TI design is an is a standalone demonstration of BiSS C operation using the PRU-ICSS. The design does not include the features and interface for this BiSS C to be used in an industrial application. That would require additional code to be developed that is somewhat along the lines of the EnDAT master interface that is presently in the Industrial SDK.

    This TI Design is a first step toward the development and inclusion of BiSS C support in the TI SYS/BIOS Industrial SDK.
    We encourage customers who are interested in rapidly developing applications using robust BiSS C implementation on the AM437x to wait for BiSS C support to be included in the Industrial SDK.

    Thank you,
    Paula
  • Hi Paula,

    Thank you for your response.

    Now I succeeded to communicate with my encoder.

    Is Gel file still required when I configure pinmux with following A9 code copied from Gel file?

        *((unsigned int*) 0x44E10990)      = ((1 << 18) | (1 << 16) | 6);	 // mcasp0_aclkx for pru0_gpi[0] ==> 28-bit shift register
    	*((unsigned int*) 0x44E10994)      =  5; 							 // mcasp0_fsx for pru0_gpo[0] ==> BiSS MA clock
    	*((unsigned int*) 0x44E10a48)      =  7; 							 // gpio5[12] for enabling receive line in RS485 receiver
    	*((unsigned int*) 0x44E10998)      =  7; 							 // gpio3[16] for disabling transmit line in RS485 receiver
    
    	*((unsigned int*) 0x44DF8C88)      |= 0x2;							// Enable GPIO3 module
    	*((unsigned int*) 0x44DF8C98)      |= 0x2;							// Enable GPIO5 module
    
    	*((unsigned int*) 0x481AE134)      &= 0xFFFEFFFF;					// Set the direction of GPIO3 pin16 to output
    	*((unsigned int*) 0x481AE194)      &= ~(1 << 16);					// Clear the GPIO3 pin 16
    	*((unsigned int*) 0x48322134)      &= 0xFFFFEFFF; 					// Set the direction of GPIO5 pin 12 to output
    	*((unsigned int*) 0x48322194)      &= ~(1 << 12);					// Clear the GPIO5 pin 12

    PRU program is loaded and started by A9 program.

    I understand what you informed about TI design, thank you.

    I have already tried EnDat application you mentioned and managed to control our linear motor with some code modification.
    Now I am planning to control a rotary motor with BiSS encoder by customising that Endat application.
    Do you think there is any other problem facing me?

  • Hi Yuji, thanks for the note, it should be OK to move above Gel file pinmux configuration inside your project. Let us know if you face any other issue.

    thank you,
    Paula
  • Hi Paula,
    thank you for your confirmation,
    Yuji Hosogaya