out_port_strobed_master with inverse readyout Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
MrMcMathew
Junior Member
Posts: 7
Joined: Tue Apr 07, 2015 9:52 pm

out_port_strobed_master with inverse readyout

Post by MrMcMathew »

Hello forum

I'd like to know if there is a way for me to have a strobed master that drives the ready out port LOW once data is beeing sent and HIGH once the transmission has finnished.

It is either that I'm blind, or no such thing is mentioned in xs1.h

Here' the discription given in xs1.h

Code: Select all

/**
 * Configures a buffered port to be a clocked output port in strobed master mode.
 * If the ready-out port is not a 1-bit port, an exception is raised.
 * The port drives the initial value on its pins until an
 * output statement changes the value driven. Outputs are driven on the next
 * falling edge of the clock. On the falling edge of the clock the ready-out
 * port is driven high if data is output on that edge, otherwise it is driven
 * low.
 * \param p The buffered port to configure.
 * \param readyout A 1-bit port to use for the ready-out signal.
 * \param clk The clock used to configure the port.
 * \param initial The initial value to output on the port.
 * \sa configure_in_port_handshake
 * \sa configure_out_port_handshake
 * \sa configure_in_port_strobed_master
 * \sa configure_in_port_strobed_slave
 * \sa configure_out_port_strobed_slave
 * \sa configure_in_port
 * \sa configure_out_port
 */
void configure_out_port_strobed_master(void port p, out port readyout,
                                      const clock clk, unsigned initial);
Haveing an inverted readyout would make things way easier for me.


View Solution
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

What happens if you invert the ready-out port before passing it to the configure function?
MrMcMathew
Junior Member
Posts: 7
Joined: Tue Apr 07, 2015 9:52 pm

Post by MrMcMathew »

uhm yeah^^"
how would one do such a thing?
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

MrMcMathew wrote:uhm yeah^^"
how would one do such a thing?
Did you try set_port_inv?
MrMcMathew
Junior Member
Posts: 7
Joined: Tue Apr 07, 2015 9:52 pm

Post by MrMcMathew »

I have never heard of that posibility. I will try that. Are ther more functionalities such as for example set_port_inv that aren't listed in the xc programming guide? And if so, is there a list of them?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Found this webpage:

https://www.xmos.com/support/tools/othe ... bed_master

Curious to learn if the above idea using set_port_inv works for you but thought you will have to consider a solution as follows (author: Richard) :

http://www.xcore.com/forum/viewtopic.ph ... t=readyout

That is, create an alternate routine that forces the ReadyOut line to behave in the requested manner.
MrMcMathew
Junior Member
Posts: 7
Joined: Tue Apr 07, 2015 9:52 pm

Post by MrMcMathew »

hmmm
setting up the strobed master and configuering the port to be inverted afterwards looks like something that might work.
In a few days i can test and inform you about what happened.
MrMcMathew
Junior Member
Posts: 7
Joined: Tue Apr 07, 2015 9:52 pm

Post by MrMcMathew »

MrMcMathew wrote: In a few days i can test and inform you about what happened.
#define a_few 183
yeah sorry about that^^"

Getting a low active readyout port using set_port_inv() does work.
One only has to make sure, that the port is set to invert after the strobed master is configured.
Otherwise the inversion is beeing overwritten by the strobed master configuration.

Thank you guys for your help, and again - sorry for the late reply.
Post Reply