cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor II

Hi everyone!

I have FPGA connected to FX3 over GPIF (using starndard admux protocol). I successfully can read/write over admux. I need INT# signal to detect events from FX3.

But I have a strange problem with enabling PIB interrupts using CyU3PPibSelectIntSources(...) function, PP_INTR_MASK register does NOT change.

By default register 's value is 0x2000 (RD_MB_FULL bit is high) and MailBox works perfect in both directions! But I need interrupt to detect other events, especially socket state and I have no idea why I can't enable them all.

I looked though all SDK examples, none of them use CyU3PPibSelectIntSources(...).

Thanks much!!

0 Likes
Reply
1 Solution
New Contributor II

Answering my own question.

I tried to write PP_INTR_MASK from hardware and could change it!

The main problem was in mistake in documentation.

Some screens from EZ-USB® FX3™ Technical Reference Manual:

PP_INTR_MASK_dock_error.png

PP_INTR_MASK is accessible for write from hardware, not software!

Therefore CyU3PPibSelectIntSources(...) function is wrong and absolutely useless.

Regards

View solution in original post

0 Likes
Reply
3 Replies
New Contributor II

Some more information...

Again, I want to work with FX3 in PP_MODE = 1. I use ADMus GPIF II protocol (in 32 bit mode). I can read/write PP-registers.

I tried to use Mailbox read and write, it works perfect, I got interrupt over pin INT# and read mailbox registers.

The problem is that I want to enable other interrupts in PP_INTR_MASK register, but register state doesn't change.

Here is CyU3PPibSelectIntSources() function source, it looks very simple and obvious:

void
CyU3PPibSelectIntSources (
  CyBool_t pibSockEn,
  CyBool_t gpifIntEn,
  CyBool_t pibErrEn,
  CyBool_t mboxIntEn,
  CyBool_t wakeupEn)
{
   uint32_t mask = 0;
   if (pibSockEn)
  mask |= CY_U3P_PIB_SOCK_AGG_AL | CY_U3P_PIB_SOCK_AGG_AH | CY_U3P_PIB_SOCK_AGG_BL | CY_U3P_PIB_SOCK_AGG_BH;
   if (gpifIntEn)
  mask |= CY_U3P_PIB_GPIF_INT;
   if (pibErrEn)
  mask |= CY_U3P_PIB_PIB_ERR | CY_U3P_PIB_GPIF_ERR;
   if (mboxIntEn)
  mask |= CY_U3P_PIB_RD_MB_FULL;
   if (wakeupEn)
  mask |= CY_U3P_PIB_WAKEUP;
  PIB->pp_intr_mask = mask;
}

Following FX3 Technical Reference manual, PIB->pp_intr_mask register has address 0xE0017E1C. I checked memory at this address, It doesn't change even I try to change it manually.

P.S. I'd not say I'm new with FX3, but this problem looks really weird. Any thoughts?

Best regards

0 Likes
Reply
New Contributor II

Answering my own question.

I tried to write PP_INTR_MASK from hardware and could change it!

The main problem was in mistake in documentation.

Some screens from EZ-USB® FX3™ Technical Reference Manual:

PP_INTR_MASK_dock_error.png

PP_INTR_MASK is accessible for write from hardware, not software!

Therefore CyU3PPibSelectIntSources(...) function is wrong and absolutely useless.

Regards

View solution in original post

0 Likes
Reply
Moderator
Moderator

Hello,

Thank you for pointing out this documentation error.

I am able to re-produce the issue - PP_INTR_MASK cannot be modified by the software.

We will correct this in the next revision of TRM and FX3 SDK.

Regards,

Sridhar

0 Likes
Reply