If your penis no longer wants to get hard, there may be a number of reasons.
Erection problems (also called "erectile dysfunction") are one of the side-effects of some HIV drugs. If you have just begun HIV treatment, the problem may soon disappear of its own accord once your body has gotten used to the drugs. Otherwise, changing medication may help.
There are drugs to treat erection problems. – However, it's important to watch out for interactions with anti-HIV drugs.
Erection problems may also have psychological causes. They can be caused by stress as well as by the fear of infecting your partner with HIV. If psychological factors are behind a physical problem, counseling at an AIDS service organization , or psychotherapy, may help.